|
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.cs.html.RequestValidationServices
public class RequestValidationServices
Back and double post validation requires that we keep a table of operations which are in progress. The table key is a composite key of sessionid.pageid. The data held for each record is a RequestData object, which encapsulates the channelContext and the operation which is running. Double (multiple) post validation is performed by testing that no entry is present for a sessionid.pageid before processing the request. Back button validation is related to processes. This support has not been added yet.
Field Summary | |
---|---|
protected long |
ageLimit
|
protected java.util.Hashtable |
pendingRequestTable
|
Constructor Summary | |
---|---|
RequestValidationServices()
Constructor for RequestValidationServices. |
Method Summary | |
---|---|
static void |
addFieldTo(Context ctx,
java.lang.String name,
java.lang.Object value)
This method adds toolkit related fields to a context. |
void |
addOpToPendingRequest(ChannelContext channelContext,
BTTServerOperation addOperation)
Once a record is added in the pending requests table, this method adds to this record the operation related with the request. |
void |
addPendingRequest(HtmlRequestData requestData)
Add request into the pending requests table |
void |
beginAgingRequest(ChannelContext channelContext)
If the system has a non-zero age limit, then set a timestamp (actually a date) for the pending request matching the session and page that is passed in. |
boolean |
deletePendingRequest(java.lang.String compositeKey)
This method removes an operation which has completed for a given page in a given session. |
java.lang.String |
getCompositeKey(ChannelContext channelContext)
Builds the composite key used to identify a request in the pending requests table. |
static java.lang.String |
getNextPageId(java.lang.String sessionId)
Generate and return the next page ID for a given session. |
BTTServerOperation |
getOperationInProcess(ChannelContext channelContext)
Return the operation in process that corresponds to the session id and page id specified in the channelContext |
java.util.Hashtable |
getPendingRequestTable()
Utility method that returns the pending requests table. |
boolean |
isMarkedAsNotAnswered(ChannelContext channelContext)
checks whether this request is product of a double click. |
boolean |
isProcessorRequest(ChannelContext channelContext)
See if the request asks or a processor instead of an operation. |
boolean |
isRequestAging(ChannelContext channelContext)
See if a request recently completed for a given page in a given session. |
boolean |
isSomeOpProcessing(java.lang.String sessionId,
java.lang.String pageId)
Utility method inditating if there is any operation in process for a given session id and page id. |
boolean |
isUnconsistentProcessor(ChannelContext channelContext)
See if a request for this processor is still in process or its aging timeout has not been reached yet. |
void |
markAsAnswered(ChannelContext channelContext)
Marks the request as answered, which means that there is no other request from the same client. |
void |
markAsNotAnswered(ChannelContext channelContext)
Marks the request as not answered, which means that there is another request from the same client which will handle the answering. |
protected void |
removeExpiredRequests()
Remove requests that are in the pendingRequestTable which have been there longer than the max aging time set for the system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable pendingRequestTable
protected long ageLimit
Constructor Detail |
---|
public RequestValidationServices()
Method Detail |
---|
public static void addFieldTo(Context ctx, java.lang.String name, java.lang.Object value) throws java.lang.Exception
ctx
- com.ibm.btt.base.Contextname
- java.lang.Stringvalue
- java.lang.Object
java.lang.Exception
public void addOpToPendingRequest(ChannelContext channelContext, BTTServerOperation addOperation) throws DSEException
channelContext
- com.ibm.btt.clientserver.ChannelContextoper
- com.ibm.btt.cs.html.HtmlServerOperation
DSEException
public void addPendingRequest(HtmlRequestData requestData) throws DSEException
requestData
- com.ibm.btt.cs.html.HtmlRequestData
DSEException
public void beginAgingRequest(ChannelContext channelContext) throws DSEException
channelContext
- com.ibm.btt.clientserver.ChannelContext
DSEException
public boolean deletePendingRequest(java.lang.String compositeKey)
compositeKey
- java.lang.String
public java.lang.String getCompositeKey(ChannelContext channelContext) throws DSEException
channelContext
- com.ibm.btt.clientserver.ChannelContext
DSEException
public static java.lang.String getNextPageId(java.lang.String sessionId)
sessionId
- java.lang.String
public BTTServerOperation getOperationInProcess(ChannelContext channelContext) throws DSEException
com.ibm.btt.clientserver.ChannelContext
-
DSEException
public boolean isMarkedAsNotAnswered(ChannelContext channelContext) throws DSEException
channelContext
-
DSEException
public boolean isProcessorRequest(ChannelContext channelContext) throws DSEException
channelContext
- com.ibm.btt.clientserver.ChannelContext
DSEException
public boolean isRequestAging(ChannelContext channelContext) throws DSEException
channelContext
- com.ibm.btt.clientserver.ChannelContext
DSEException
public boolean isSomeOpProcessing(java.lang.String sessionId, java.lang.String pageId) throws DSEException
sessionId
- pageId
-
DSEException
public boolean isUnconsistentProcessor(ChannelContext channelContext) throws DSEException
channelContext
- com.ibm.btt.clientserver.ChannelContext
DSEException
public void markAsNotAnswered(ChannelContext channelContext) throws DSEException
channelContext
-
DSEException
public void markAsAnswered(ChannelContext channelContext) throws DSEException
channelContext
-
DSEException
protected void removeExpiredRequests()
public java.util.Hashtable getPendingRequestTable() throws java.lang.Exception
java.lang.Exception
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |