|
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.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 | |
---|---|
static java.lang.String |
EXIT_EVENT_NAME
Name of the parameter in which the operation stores the name of the event that the automaton uses to go on with the flow. |
Tag |
inputFormatTag
Map format used to map data from the calling processor context to the context of the operation/processor that this state executes. |
protected Operation |
operation
Operation which this state will execute. |
protected Semaphore |
operationRepliedSemaphore
Semaphore where the execution waits until the operation raises an operationRepliedEvent. |
Tag |
outputFormatTag
Map format used to map data from the context of the operation/processor that this state executes to the calling processor context. |
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 | |
---|---|
void |
activate()
Activates an operation state. |
boolean |
chainOrAssignContext(Operation theOperation)
Verifies whether the operation has a context. |
protected void |
changeProcessorState(DSEEventObject event)
This utility method is used to change the state of a processor in response to a change state event. |
protected void |
doDataMapping(DataMapperFormat format,
Context sourceCtx,
Context targetCtx)
This utility method maps data from the source context to the target context using the supplied DataMapperFormat. |
protected void |
fireDSEChangeStateEvent(java.lang.String targetStateName,
boolean ignoreEntryActionsFlag,
boolean ignoreExitActionsFlag,
java.lang.String transitionName)
Dispatches a change state event with required information. |
Tag |
getInputFormatTag()
Returns the input format tag attribute of this class. |
Operation |
getOperation()
Returns the operation attribute of this class. |
Tag |
getOutputFormatTag()
Returns the output format tag 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 void |
processEventQueue(Vector otherTrigs)
Provides an internal routine for the activate() method. |
protected void |
processQueue(Vector otherTrigs)
Processes the events queue of the processor. |
protected Operation |
readOperation()
Gets the operation from the operation name stored in the typeIdInfo state's attribute. |
void |
setInputFormatTag(Tag newInputFormatTag)
Sets the input format tag property. |
void |
setOperation(Operation newOperation)
Sets the input format property. |
void |
setOutputFormatTag(Tag newOutputFormatTag)
Sets the output format tag property. |
protected void |
signalEvent()
Creates and signals the event that the state processes. |
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.base.Handler |
---|
handleEvent, handleEvent, stopHandlingEvent, stopHandlingEvent |
Field Detail |
---|
protected Semaphore operationRepliedSemaphore
public static final java.lang.String EXIT_EVENT_NAME
public Tag inputFormatTag
public Tag outputFormatTag
protected Operation operation
Constructor Detail |
---|
public DSEOperationState()
Method Detail |
---|
public void activate() throws DSEInvalidArgumentException, 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.
activate
in interface State
activate
in class DSEState
DSEInvalidArgumentException
DSEProcessorException
public boolean chainOrAssignContext(Operation theOperation) throws DSEProcessorException
thisOp
- com.ibm.btt.base.OperationcontextName
- java.lang.String
DSEProcessorException
protected void changeProcessorState(DSEEventObject event) throws DSEProcessorException
event
- com.ibm.btt.base.DSEEventObject
DSEProcessorException
protected void doDataMapping(DataMapperFormat format, Context sourceCtx, Context targetCtx) throws DSEException
format
- com.ibm.btt.base.DataMapperFormatsourceCtx
- com.ibm.btt.base.ContexttargetCtx
- com.ibm.btt.base.Context
DSEException
protected void fireDSEChangeStateEvent(java.lang.String targetStateName, boolean ignoreEntryActionsFlag, boolean ignoreExitActionsFlag, java.lang.String transitionName) throws DSEProcessorException
targetStateName
- java.lang.StringignoreEntryActionsFlag
- booleanignoreExitActionsFlag
- booleantransitionName
- java.lang.String
DSEProcessorException
public Tag getInputFormatTag()
public Operation getOperation()
public Tag getOutputFormatTag()
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 void processEventQueue(Vector otherTrigs) throws DSEInvalidArgumentException, DSEProcessorException
processEventQueue
in class DSEState
otherTrigs
- com.ibm.btt.base.Vector
DSEInvalidArgumentException
DSEProcessorException
protected void processQueue(Vector otherTrigs) throws DSEInvalidArgumentException, DSEProcessorException
otherTrigs
- Vector
DSEInvalidArgumentException
DSEProcessorException
protected Operation readOperation() throws DSEInvalidArgumentException
operationName
- java.lang.String
DSEInvalidArgumentException
- The exception description.public void setInputFormatTag(Tag newInputFormatTag)
newInputFormatTag
- com.ibm.btt.base.Tagpublic void setOperation(Operation newOperation)
newOperation
- com.ibm.btt.base.Operationpublic void setOutputFormatTag(Tag newOutputFormatTag)
newOutputFormatTag
- com.ibm.btt.base.Tagprotected void signalEvent() throws DSEProcessorException
DSEProcessorException
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |