|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.clientserver.DSERequestHandler
public abstract class DSERequestHandler
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 |
Constructor Summary | |
---|---|
DSERequestHandler()
|
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.Object |
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 java.lang.String |
formatOpContext(ServerOperation oper,
ChannelContext channelCtx,
java.lang.String csResponseFormat)
Use reply formatter to format the operation context to string |
protected PresentationHandler |
getPresentationHandler(ChannelContext channelContext)
Defalt implementation to get the presentation handler from the registry. |
protected java.lang.String |
getRequestValue(ChannelContext channelCtx,
java.lang.String key)
Convenience method to get the request data element's value |
protected Context |
getSessionContext(java.lang.String sessionId,
java.lang.String applicationId)
Get session context It will be either an application session context, an application sub session context or any other predefined parent of the operation context. |
protected java.lang.String |
getSessionId(ChannelContext aChannelContext)
Convenience method to dertermine the session id from the channel session |
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.Throwable ex)
Handle the exceptions raised by the request handler Log the exception to the server trace console if enabled |
protected boolean |
isNotNull(java.lang.String str)
check the string is null 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 |
runInSession(ChannelContext channelContext)
Convenience method to determine the runInSession value |
protected void |
setReplyFmt(ChannelContext channelContext,
java.lang.String csReplyFormat)
Set the reply format name |
protected java.lang.String |
tryToFormat(java.lang.String fmtName,
ServerOperation oper,
ChannelContext ctx)
Use reply formatter to format the operation context to string Try to use formatter defined in the operation, if it isn't found, try to use global formatter. |
protected void |
tryToUnformat(java.lang.String fmtName,
java.lang.String requestData,
ServerOperation oper)
Unformat the request data and set the values to operation context. |
protected void |
unFormatRequest(ServerOperation oper,
ChannelContext ctx,
java.lang.String csRequestFormat,
java.lang.String requestData)
Unformat the request and set the values to operation context |
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 |
---|
protected java.lang.String errorCode
protected static final java.util.ResourceBundle javaClientTrace
protected static final java.util.ResourceBundle javaClientException
Constructor Detail |
---|
public DSERequestHandler()
Method Detail |
---|
protected java.lang.Object executeRequest(ChannelContext channelContext) throws java.lang.Exception
channelContext
- com.ibm.btt.clientserver.ChannelContext
java.lang.Exception
protected void executeSession(ChannelContext channelContext) throws java.lang.Exception
channelContext
- com.ibm.btt.clientserver.ChannelContext
java.lang.Exception
protected PresentationHandler getPresentationHandler(ChannelContext channelContext) throws DSENoRegisteredPresentationHandlerException
channelContext
- com.ibm.btt.clientserver.ChannelContext
DSENoRegisteredPresentationHandlerException
protected void handleException(ChannelContext channelContext, java.lang.Exception ex)
channelContext
- com.ibm.btt.clientserver.ChannelContextex
- java.lang.Exceptionprotected void handleException(java.lang.Throwable ex)
ex
- java.lang.Exceptionprotected void preProcessRequest(ChannelContext channelContext) throws DSEException
channelContext
- com.ibm.btt.clientserver.ChannelContext
DSEException
public void process(ChannelContext aChannelCtx) throws java.lang.Exception
aChannelCtx
- com.ibm.btt.clientserver.ChannelContext
java.lang.Exception
public void processRequest(ChannelContext channelContext)
processRequest
in interface RequestHandler
channelContext
- com.ibm.btt.clientserver.ChannelContextpublic void processSessionRequest(ChannelContext channelContext)
processSessionRequest
in interface RequestHandler
channelContext
- com.ibm.btt.clientserver.ChannelContextprotected boolean usingCookies(ChannelContext channelContext)
channelContext
- com.ibm.btt.clientserver.ChannelContext
protected boolean runInSession(ChannelContext channelContext)
channelContext
- com.ibm.btt.clientserver.ChannelContext
protected void checkExecutionPermission(java.lang.String sessionId, java.lang.String invokerID, ChannelContext channelContext) throws ACLException
sessionId
- invokerID
- channelContext
-
ACLException
protected void unFormatRequest(ServerOperation oper, ChannelContext ctx, java.lang.String csRequestFormat, java.lang.String requestData) throws DSEInvalidRequestException, DSEInvalidArgumentException, java.io.IOException, DSEObjectNotFoundException
oper
- ctx
- csRequestFormat
- requestData
-
DSEInvalidRequestException
DSEInvalidArgumentException
java.io.IOException
DSEObjectNotFoundException
protected void tryToUnformat(java.lang.String fmtName, java.lang.String requestData, ServerOperation oper) throws DSEInvalidRequestException, DSEInvalidArgumentException, java.io.IOException
fmtName
- requestData
- oper
-
DSEInvalidRequestException
DSEInvalidArgumentException
java.io.IOException
protected java.lang.String formatOpContext(ServerOperation oper, ChannelContext channelCtx, java.lang.String csResponseFormat) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInvalidClassException, java.io.IOException, DSEObjectNotFoundException
oper
- channelCtx
- csResponseFormat
-
DSEInvalidRequestException
DSEInvalidArgumentException
DSEInvalidClassException
java.io.IOException
DSEObjectNotFoundException
protected java.lang.String tryToFormat(java.lang.String fmtName, ServerOperation oper, ChannelContext ctx) throws DSEInvalidArgumentException, java.io.IOException, DSEInvalidClassException, DSEInvalidRequestException
fmtName
- oper
- ctx
-
DSEInvalidArgumentException
java.io.IOException
DSEInvalidClassException
DSEInvalidRequestException
protected void setReplyFmt(ChannelContext channelContext, java.lang.String csReplyFormat)
channelContext
- csReplyFormat
- protected boolean isNotNull(java.lang.String str)
str
-
protected java.lang.String getRequestValue(ChannelContext channelCtx, java.lang.String key) throws DSEObjectNotFoundException
channelCtx
- key
-
DSEObjectNotFoundException
protected java.lang.String getSessionId(ChannelContext aChannelContext)
aChannelContext
- com.ibm.btt.clientserver.ChannelContext
protected Context getSessionContext(java.lang.String sessionId, java.lang.String applicationId) throws DSEInvalidRequestException
sessionId
- java.lang.StringapplicationId
- java.lang.String
DSEInvalidRequestException
- There is no context associated with given sessionId or
applicationId
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |