|
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.base.DSEHandler
com.ibm.btt.automaton.DSEState
com.ibm.btt.automaton.ext.DSEBaseState
com.ibm.btt.automaton.ext.DSEOperationState
public class DSEOperationState
This class is an extension of the DSEState. It implements a state that is related to an operation. When the operation state is reached, the Automaton looks for the associated operation (which is defined in the typeIdInfo attribute) chains it to the appropriate context, and executes it.
The operation has the responsibility of firing an event when it ends. This event contains a parameter named "dse_exitEventName". This parameter contains the name of the event that the state machine uses to change to the next state. The operation context is chained to the processor context, but the data sharing should be done using the map formats.
Field Summary | |
---|---|
protected Operation |
operation
Operation which this state will execute. |
protected Semaphore |
operationRepliedSemaphore
Semaphore where the execution waits until the operation raises an operationRepliedEvent. |
protected boolean |
usingProcessorCtx
usingProcCtx means that the op has no ctx defined, so the proc ctx is used instead |
Fields inherited from class com.ibm.btt.automaton.ext.DSEBaseState |
---|
EXIT_EVENT_NAME, inputFormatTag, outputFormatTag |
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 | |
---|---|
DSEOperationState()
|
Method Summary | |
---|---|
protected void |
afterActivate()
The dispose logic after state activation, here to release resources used by this state. |
protected void |
beforeActivate()
The preparation for state activation, it will be invoked after entry actions and before input mapping. |
boolean |
chainOrAssignContext(Operation theOperation)
Verifies whether the operation has a context. |
protected void |
doActivate()
Activates an operation state. |
protected Context |
getContext()
Get the context of state which will be used by input and output mapping. |
Operation |
getOperation()
Returns the operation attribute of this class. |
void |
handleOperationRepliedEvent(OperationRepliedEvent event)
Signals the semaphore when the state's activate method is waiting for the operation end. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes the state of this object from externalized data. |
protected Operation |
readOperation()
Gets the operation from the operation name stored in the typeIdInfo state's attribute. |
void |
setOperation(Operation newOperation)
Sets the input format property. |
Methods inherited from class com.ibm.btt.automaton.ext.DSEBaseState |
---|
activate, changeProcessorState, doDataMapping, fireDSEChangeStateEvent, getInputFormatTag, getOutputFormatTag, processEventQueue, processQueue, setInputFormatTag, setOutputFormatTag, signalEvent |
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, terminate |
Methods inherited from interface com.ibm.btt.base.Handler |
---|
dispatchEvent, handleEvent, handleEvent, stopHandlingEvent, stopHandlingEvent |
Field Detail |
---|
protected Semaphore operationRepliedSemaphore
protected Operation operation
protected boolean usingProcessorCtx
Constructor Detail |
---|
public DSEOperationState()
Method Detail |
---|
protected void beforeActivate() throws DSEInvalidArgumentException, DSEProcessorException
DSEBaseState
beforeActivate
in class DSEBaseState
DSEInvalidArgumentException
DSEProcessorException
protected void doActivate() throws DSEProcessorException
This method waits until this event is received. It then tries to raise the event created from the information received from the operation. The state processes this event and put it on the queue. Processing the event queue provokes a state change.
doActivate
in class DSEBaseState
DSEProcessorException
protected void afterActivate() throws DSEProcessorException
DSEBaseState
afterActivate
in class DSEBaseState
DSEProcessorException
protected Context getContext()
DSEBaseState
getContext
in class DSEBaseState
public boolean chainOrAssignContext(Operation theOperation) throws DSEProcessorException
thisOp
- com.ibm.btt.base.OperationcontextName
- java.lang.String
DSEProcessorException
public Operation getOperation()
public void handleOperationRepliedEvent(OperationRepliedEvent event)
handleOperationRepliedEvent
in interface OperationRepliedListener
event
- com.ibm.btt.base.OperationRepliedEventpublic java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
initializeFrom
in interface State
initializeFrom
in class DSEState
aTag
- com.ibm.btt.base.Tag
java.io.IOException
DSEException
protected Operation readOperation() throws DSEInvalidArgumentException
operationName
- java.lang.String
DSEInvalidArgumentException
- The exception description.public void setOperation(Operation newOperation)
newOperation
- com.ibm.btt.base.Operation
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |