IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.clientserver
Class DSERequestHandler

java.lang.Object
  extended bycom.ibm.btt.clientserver.DSERequestHandler
All Implemented Interfaces:
RequestHandler
Direct Known Subclasses:
JavaRequestHandler

public abstract class DSERequestHandler
extends java.lang.Object
implements RequestHandler

This class implements RequestHandler interface.

This is the abstract implementation to be used by all channel specific request handlers


Field Summary
protected  java.lang.String errorCode
           
protected static java.util.ResourceBundle javaClientException
           
protected static java.util.ResourceBundle javaClientTrace
          Trace File for NLS
static java.lang.String USING_WORKAREA
          The flag which indicate that using WorkArea or not.
 
Constructor Summary
DSERequestHandler()
          DSERequestHandler constructor
 
Method Summary
protected  void checkExecutionPermission(java.lang.String sessionId, java.lang.String invokerID, ChannelContext channelContext)
          Checks if the user associated to the session sessId can execute the operation opName.
protected  java.lang.String executeRequest(ChannelContext channelContext)
          Extend this method to perform the actual operation or process
protected  void executeSession(ChannelContext channelContext)
          Extend this method to perform any required application session processing
protected  PresentationHandler getPresentationHandler(ChannelContext channelContext)
          Defalt implementation to get the presentation handler from the registry.
protected  void handleException(ChannelContext channelContext, java.lang.Exception ex)
          Handle the exceptions raised by the request handler Default implementation attempts to invoke the presentation handler to process the reply
protected  void handleException(java.lang.Exception ex)
          Handle the exceptions raised by the request handler Log the exception to the server trace console if enabled
 boolean isWorkAreaUsed()
          Session propagation is configured on the system configuration file (e.g. dse.ini) to indicate using WorkArea or not.
protected  void preProcessRequest(ChannelContext channelContext)
          Extend this method to perform any initial processing required by the request handler
 void process(ChannelContext aChannelCtx)
          This method will control all the logic of the requestHandler
 void processRequest(ChannelContext channelContext)
          Process the request for a specific channel This is the default flow to process a request.
 void processSessionRequest(ChannelContext channelContext)
          Process the request to establish a session for a specific channel This is the default flow to process a session request.
protected  boolean usingCookies(ChannelContext channelContext)
          Convenience method to determine if cookies are being used to manage the client server session for the specified device type By default using cookies is false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorCode

protected java.lang.String errorCode

USING_WORKAREA

public static final java.lang.String USING_WORKAREA
The flag which indicate that using WorkArea or not. This flag is definied in dse.ini file. The default value is: false It is important to note that this service only runs under the Enterprise Edition of WebSphere 5.0. Application running in a non-WAS5.0-EE environment shall not be able to make use of the session propagation

See Also:
Constant Field Values

javaClientTrace

protected static java.util.ResourceBundle javaClientTrace
Trace File for NLS


javaClientException

protected static java.util.ResourceBundle javaClientException
Constructor Detail

DSERequestHandler

public DSERequestHandler()
DSERequestHandler constructor

Method Detail

executeRequest

protected java.lang.String executeRequest(ChannelContext channelContext)
                                   throws java.lang.Exception
Extend this method to perform the actual operation or process

Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext
Returns:
com.ibm.btt.base.ServerOperation
Throws:
java.lang.Exception

executeSession

protected void executeSession(ChannelContext channelContext)
                       throws java.lang.Exception
Extend this method to perform any required application session processing

Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext
Throws:
java.lang.Exception

getPresentationHandler

protected PresentationHandler getPresentationHandler(ChannelContext channelContext)
                                              throws DSENoRegisteredPresentationHandlerException
Defalt implementation to get the presentation handler from the registry.

Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext
Returns:
com.ibm.btt.clientserver.PresentationHandler
Throws:
DSENoRegisteredPresentationHandlerException

handleException

protected void handleException(ChannelContext channelContext,
                               java.lang.Exception ex)
Handle the exceptions raised by the request handler Default implementation attempts to invoke the presentation handler to process the reply

Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext
ex - java.lang.Exception

handleException

protected void handleException(java.lang.Exception ex)
Handle the exceptions raised by the request handler Log the exception to the server trace console if enabled

Parameters:
ex - java.lang.Exception

preProcessRequest

protected void preProcessRequest(ChannelContext channelContext)
                          throws DSEException
Extend this method to perform any initial processing required by the request handler

Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext
Throws:
DSEException

process

public void process(ChannelContext aChannelCtx)
             throws java.lang.Exception
This method will control all the logic of the requestHandler

Parameters:
aChannelCtx - com.ibm.btt.clientserver.ChannelContext
Throws:
java.lang.Exception

processRequest

public void processRequest(ChannelContext channelContext)
Process the request for a specific channel This is the default flow to process a request. It may generate the following error code during the process: CSS01.

Specified by:
processRequest in interface RequestHandler
Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext

processSessionRequest

public void processSessionRequest(ChannelContext channelContext)
Process the request to establish a session for a specific channel This is the default flow to process a session request.

Specified by:
processSessionRequest in interface RequestHandler
Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext

usingCookies

protected boolean usingCookies(ChannelContext channelContext)
Convenience method to determine if cookies are being used to manage the client server session for the specified device type By default using cookies is false

Parameters:
channelContext - com.ibm.btt.clientserver.ChannelContext
Returns:
boolean

checkExecutionPermission

protected void checkExecutionPermission(java.lang.String sessionId,
                                        java.lang.String invokerID,
                                        ChannelContext channelContext)
                                 throws ACLException
Checks if the user associated to the session sessId can execute the operation opName. If the user can't then a com.ibm.btt.services.acl.ACLException is thrown.

Parameters:
sessionId -
invokerID -
channelContext -
Throws:
ACLException

isWorkAreaUsed

public boolean isWorkAreaUsed()
Session propagation is configured on the system configuration file (e.g. dse.ini) to indicate using WorkArea or not. The default value is false

Returns:
boolean

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005