org.aselect.server.request.handler.aselect.authentication
Class RequestHandlerFactory

java.lang.Object
  extended by org.aselect.server.request.handler.aselect.authentication.RequestHandlerFactory

public class RequestHandlerFactory
extends java.lang.Object

The request handler factory for the A-Select Server.

Description:
A singleton factory, which can be used to create IRequestHandler implementations. The factory uses a RequestParser to determine the type of request handler and constructs this type of handler.

Concurrency issues:
The class is a singleton, so the same class is used in all the classes of the A-Select Server.

Author:
Alfa & Ariss

Method Summary
 IRequestHandler createRequestHandler(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
          Factory method for creating a request handler.
static RequestHandlerFactory getHandle()
          Get a static handle to the RequestHandlerFactory instance.
 void init(java.lang.Object oConfig, java.lang.String sServerId, java.lang.String sOrg)
          Initializes the RequestHandlerFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHandle

public static RequestHandlerFactory getHandle()
Get a static handle to the RequestHandlerFactory instance.

Description:
Checks if a static instance exists, otherwise it is created. This instance is returned.

Concurrency issues:
-

Preconditions:
-

Postconditions:
One instance of the RequestHandlerFactory exists.

Returns:
A static handle to the RequestHandlerFactory

init

public void init(java.lang.Object oConfig,
                 java.lang.String sServerId,
                 java.lang.String sOrg)
          throws ASelectException
Initializes the RequestHandlerFactory.

Description:
Initializes the components.

Concurrency issues:
-

Preconditions:
-

Postconditions:
The instance variables and components are initialized.

Parameters:
oConfig - The configuration section
sServerId - The A-Select Server ID.
sOrg - The A-Select server organization.
Throws:
ASelectException

createRequestHandler

public IRequestHandler createRequestHandler(javax.servlet.http.HttpServletRequest servletRequest,
                                            javax.servlet.http.HttpServletResponse servletResponse)
                                     throws ASelectCommunicationException
Factory method for creating a request handler.

Description:
Uses a RequestParser to determine the type of request handler and constructs this type of handler.

Concurrency issues:
-

Preconditions:
Postconditions:
-

Parameters:
servletRequest - The request that was issued to the server.
servletResponse - The response to the client.
Returns:
A request handler which can be used to process the request.
Throws:
ASelectCommunicationException - If communication failed and no response was sent to the client yet.


Copyright © 2008 SURFnet BV. All Rights Reserved.