IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.automaton.ext
Class ClientState

java.lang.Object
  extended by com.ibm.btt.base.DSEHandler
      extended by com.ibm.btt.automaton.DSEState
          extended by com.ibm.btt.automaton.html.DSEHtmlState
              extended by com.ibm.btt.automaton.ext.ClientState
All Implemented Interfaces:
FormatEnabledState, State, Handler, Traceable, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
PopupPageClientState

public abstract class ClientState
extends DSEHtmlState

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.btt.automaton.html.DSEHtmlState
CONSEQ, contextTag, FINAL_PAGE, finalPage, INPUT_MAP_FMT, inputFormatTag, INTER_STATE_FMT, interStateFmt, KEEP_CTXT_FOR_VALIDATION, keepCtxt, OUTPUT_MAP_FMT, outputFormatTag, stateContext
 
Fields inherited from class com.ibm.btt.automaton.DSEState
ABORT_PROCESS, actionHandlers, CHANGE_STATE, CONDITIONS, CONTINUE, DEFAULT_TYPE, done, ENTRY_ACTIONS, entryActionsTags, EXECUTE_ACTION_AND_CHANGESTATE, EXIT_ACTIONS, exitActionsTags, exitEventName, FINAL_TYPE, ignoreEntryActions, INITIAL_TYPE, name, PAGE_TYPE, pqThread, processor, runningModeFlag, sharedNotifiers, SKIP_ACTION, SKIP_ALL_ACTIONS, SKIP_CONDITIONS, SUBFLOW_TYPE, suspendedThread, SUSPENDTIME, tag, transitions, TRANSITIONS, type, TYPE, TYPE_ID_INFO, typeIdInfo
 
Constructor Summary
ClientState()
           
 
Method Summary
 void activate()
          The HtmlState has two special types which differentiates it from the State.
protected  void addRequiredDataToContext(Context context)
          Override this method to add more data which will be brought to client side.
protected  void afterFirstExecute()
          Execute more logic after first time execution.
 java.lang.String generateClientResponse()
          Generate JSON response to client side.
protected abstract  java.lang.String getCommand()
          Return the command of behavior which will be brought to client side.
 java.lang.Object initializeFrom(Tag aTag)
          Use CLIENT_TYPE to return control to caller.
 
Methods inherited from class com.ibm.btt.automaton.html.DSEHtmlState
changeProcessorState, doDataMapping, doEntryActions, doInputDataMapping, doOutputDataMapping, executeActions, executeActions, fireDSEChangeStateEvent, fireDSEChangeStateEvent, fireDSEChangeStateEvent, getConsequentiality, getContext, getContextTag, getFinalPage, getInputFormatTag, getInterStateFormatTag, getOutputFormatTag, isIgnoreReturnType, isKeepContext, processEventQueue, setConsequentiality, setContext, setContextTag, setFinalPage, setIgnoreReturnType, setInputFormatTag, setInterStateFormatTag, setKeepContext, setOutputFormatTag, terminate
 
Methods inherited from class com.ibm.btt.automaton.DSEState
abort, addHandlersForAction, dispatchEvent, doExitActions, externalizer, fireDSEChangeStateEvent, fireDSEChangeStateEvent, fireDSEChangeStateEvent, getEntryActions, getExitActions, getGuardConditionResult, getInstanceOfAction, getName, getProcessor, getTag, getTraceMessage, getTransitions, getType, getTypeIdInfo, isIgnoreEntryActions, isRunningModeFlag, readExternal, readExternal, removeExternal, removeHandlersForAction, removeHandlersForAction, resume, setEntryActions, setExitActions, setIgnoreEntryActions, setName, setProcessor, setTag, setTransitions, setType, setTypeIdInfo, subscribeToShareNotifiers, suspend, toString, toStrings, toTags, unsubscribeToSharedNotifiers, writeExternal, writeExternal
 
Methods inherited from class com.ibm.btt.base.DSEHandler
handleEvent, handleEvent, stopHandlingEvent, stopHandlingEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.btt.automaton.State
abort, getEntryActions, getName, getProcessor, getTransitions, getType, getTypeIdInfo, resume, setEntryActions, setIgnoreEntryActions, setName, setProcessor, setTransitions, setType, setTypeIdInfo, suspend
 
Methods inherited from interface com.ibm.btt.base.Handler
dispatchEvent, handleEvent, handleEvent, stopHandlingEvent, stopHandlingEvent
 

Constructor Detail

ClientState

public ClientState()
Method Detail

activate

public final void activate()
                    throws DSEInvalidArgumentException,
                           DSEProcessorException
Description copied from class: DSEHtmlState
The HtmlState has two special types which differentiates it from the State. Type PAGE: this state returns control to the user, and displays an HTML page. When this page is posted, the state is activated another time. We must ensure that the actions associated are processed only once (the first time the state is activated) and events are processed as well only once (the second time that it is activated). Type SUBFLOW: Same as PAGE, but it runs a subFlow instead of displaying a page. This two types don't receive events from actions or from notifiers in the context hierarchy, the events are received only from the HTML page (type PAGE) or from the typeIdInfo of the child process (type SUBFLOW).

Specified by:
activate in interface State
Overrides:
activate in class DSEHtmlState
Throws:
DSEInvalidArgumentException
DSEProcessorException

afterFirstExecute

protected void afterFirstExecute()
                          throws DSEProcessorException,
                                 DSEInvalidArgumentException
Execute more logic after first time execution.

Throws:
DSEProcessorException
DSEInvalidArgumentException

generateClientResponse

public java.lang.String generateClientResponse()
                                        throws DSEInvalidRequestException
Generate JSON response to client side. Subclass can extend this method to filter the data which response to client side.

Returns:
JSON response message to client side.
Throws:
DSEInvalidRequestException

getCommand

protected abstract java.lang.String getCommand()
Return the command of behavior which will be brought to client side.

Returns:

addRequiredDataToContext

protected void addRequiredDataToContext(Context context)
Override this method to add more data which will be brought to client side.

Parameters:
context -

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException,
                                       DSEException
Use CLIENT_TYPE to return control to caller.

Specified by:
initializeFrom in interface State
Overrides:
initializeFrom in class DSEHtmlState
Parameters:
aTag - com.ibm.btt.base.Tag
Returns:
java.lang.Object
Throws:
java.io.IOException - The object can not be created.
DSEException
See Also:
com.ibm.btt.automaton.html.DSEHtmlProcessor.stateReturnsControl(State state)

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011