com.ibm.dse.clientserver
Class DSERequestHandler

java.lang.Object
  |
  +--com.ibm.dse.clientserver.DSERequestHandler
Direct Known Subclasses:
HtmlRequestHandler, 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


Constructor Summary
DSERequestHandler()
          DSERequestHandler constructor
 
Method Summary
protected  void endRequest(ServerOperation aServerOperation)
          Extend this method to perform to perform any post processing of the request if required.
protected  ServerOperation 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
protected  void preProcessRequest(ChannelContext channelContext)
          Extend this method to perform any initial processing required by the request handler
 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
 

Constructor Detail

DSERequestHandler

public DSERequestHandler()
DSERequestHandler constructor
Method Detail

endRequest

protected void endRequest(ServerOperation aServerOperation)
Extend this method to perform to perform any post processing of the request if required.
Parameters:
channelContext - com.ibm.dse.clientserver.ServerOperation

executeRequest

protected ServerOperation executeRequest(ChannelContext channelContext)
                                  throws java.lang.Exception
Extend this method to perform the actual operation or process
Parameters:
channelContext - com.ibm.dse.clientserver.ChannelContext
Returns:
com.ibm.dse.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.dse.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.dse.clientserver.ChannelContext
Returns:
com.ibm.dse.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.dse.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.dse.clientserver.ChannelContext
Throws:
DSEException -  

processRequest

public void processRequest(ChannelContext channelContext)
Process the request for a specific channel This is the default flow to process a request.
Specified by:
processRequest in interface RequestHandler
Parameters:
channelContext - com.ibm.dse.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.dse.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.dse.clientserver.ChannelContext
Returns:
boolean