nbi.xmlsec
Class PEP

java.lang.Object
  extended bynbi.xmlsec.PEP

public class PEP
extends Object

This class implements a Policy Enforcement Point. The implementation bases on the Jetty HttpServer implementation. The PEP acts like an Filter between a client and a resource server. The configuration is done in the config.xml file, according to the Jakarta Commons Configuration API.

Since:
Version:
$Revision: 1.17 $
Author:
Lutz Suhrbier

Field Summary
private  Configuration configuration
          The PEP's configuration
private  HttpServer filter
          The PEP's filter
(package private) static Logger logger
           
 
Constructor Summary
PEP(Configuration config)
          Inits the PEP based on the given configuration.
 
Method Summary
static String getClassName(Configuration config)
          Get the PEP's class name from the configuration.
 Configuration getConfiguration()
          Gets the configuration
 HttpServer getFilter()
          Gets the filter
protected  Object getFilterInstance(Configuration config)
          Sets up the PEP filter based on the given configuration.
static void main(String[] args)
           
 void setConfiguration(Configuration configuration)
          Sets configuration
 void setFilter(HttpServer filter)
          Sets filter
(package private)  void start()
          Starts the PEP.
(package private)  void stop()
          Stops the PEP.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static Logger logger

configuration

private Configuration configuration
The PEP's configuration


filter

private HttpServer filter
The PEP's filter

Constructor Detail

PEP

public PEP(Configuration config)
    throws Exception
Inits the PEP based on the given configuration. Depending on the configuration a Http-Server is set up creating appropriate listeners and handlers.

Parameters:
config - PEP's configuration.
Throws:
Exception
Method Detail

getFilterInstance

protected Object getFilterInstance(Configuration config)
                            throws UnknownHostException,
                                   ClassNotFoundException,
                                   NoSuchMethodException,
                                   InvocationTargetException,
                                   InstantiationException,
                                   IllegalAccessException
Sets up the PEP filter based on the given configuration. Depending on the configuration a Http-Server is set up creating appropriate listeners and handlers.

Parameters:
config - PEP's configuration.
Throws:
Exception
UnknownHostException
ClassNotFoundException
NoSuchMethodException
InvocationTargetException
InstantiationException
IllegalAccessException

start

void start()
     throws Exception
Starts the PEP. Sets the wantClientAuth option of the ServerSocket according to the configuration.

Throws:
Exception

stop

void stop()
    throws InterruptedException
Stops the PEP.

Throws:
Exception
InterruptedException

getConfiguration

public Configuration getConfiguration()
Gets the configuration

Returns:
Returns the configuration.

setConfiguration

public void setConfiguration(Configuration configuration)
Sets configuration

Parameters:
configuration - The configuration to set.

setFilter

public void setFilter(HttpServer filter)
Sets filter

Parameters:
filter - The filter to set.

getFilter

public HttpServer getFilter()
Gets the filter

Returns:
Returns the filter.

getClassName

public static String getClassName(Configuration config)
Get the PEP's class name from the configuration.

Parameters:
config - PEP's configuration
Returns:
PEP's class name or null.

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2006 Lutz Suhrbier, Freie Universitšt Berlin. All Rights Reserved.