|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.DSENotifier | +--com.ibm.dse.automaton.DSEProcessor
Default implementation of a Processor.
Events fired by a DSEProcessor DSEProcessor.STATUSCHANGEEVENT will be fired on status change (except normal termination when the status is set to COMPLETED). The new status is stored in the event's parameter table with key = "status". DSEProcessor.TERMINATEEVENT will be fired when the process is terminated.
Field Summary | |
static java.lang.String |
ABORTED
|
protected ProcessorStatusChangedListener |
aProcessorStatusChangedListener
|
static java.lang.String |
CHANGESTATE
|
protected boolean |
cleanQueueOnSwitch
|
static java.lang.String |
COMPLETED
|
protected Context |
context
|
protected State |
currentState
|
protected Queue |
eventQueue
|
static ProcessorExternalizer |
externalizer
|
static java.lang.String |
INITIALIZED
|
static java.lang.String |
NOT_INITIALIZED
|
protected java.lang.String |
processorId
|
protected java.lang.String |
processorName
|
static java.lang.String |
RUNNING
|
protected Tag |
stateTag
|
protected java.lang.String |
status
|
static java.lang.String |
STATUSCHANGEEVENT
|
static java.lang.String |
SUSPENDED
|
static java.lang.String |
TERMINATEEVENT
|
Fields inherited from class com.ibm.dse.base.DSENotifier |
handlersList,
name |
Fields inherited from interface com.ibm.dse.automaton.Processor |
COMPID |
Constructor Summary | |
DSEProcessor()
Creates an instance of type DSEProcessor. |
|
DSEProcessor(boolean mustRegister)
Creates an instance of type DSEProcessor. |
|
DSEProcessor(java.lang.String aName)
Creates an instance of type DSEProcessor. |
|
DSEProcessor(java.lang.String aName,
java.lang.String aTID)
Creates an instance of type DSEProcessor. |
Method Summary | |
void |
abort()
This method ends the flow of the processor, using the current State. |
void |
addProcessorStatusChangedListener(ProcessorStatusChangedListener param)
Method adds a listener to the processor's STATUSCHANGEEVENT and TERMINATEDEVENT. |
void |
changeState(java.lang.String newState)
Terminates the currentState, gets the Tag (using the newState param passed in) to reinitialize the currentState object with the newState. |
void |
changeState(java.lang.String newState,
boolean ignoreEntryActionsValue)
Terminates the currentState, gets the Tag (using the newState param passed in) to reinitialize the currentState object with the newState. |
void |
cleanEventQueue()
Clears the events in the eventQueue by replacing with a new Queue! |
void |
close()
This method unchains the context and closes the action, releasing the currentState and eventQueue objects. |
void |
execute()
Executes a Processor. |
Externalizer |
externalizer()
This method gets the externalizer instance used to build. |
protected void |
fireProcessorStatusChangedEvent(ProcessorStatusChangedEvent event)
Method to support listener events. |
protected void |
fireProcessorTerminatedEvent(ProcessorTerminatedEvent event)
Method to support listener events. |
Context |
getContext()
Returns the value of the context property. |
State |
getCurrentState()
Returns the value of the currentState property. |
java.lang.String |
getCurrentStateType()
Return the current State's Type. |
Queue |
getEventQueue()
Returns the value of the eventQueue property. |
static ProcessorExternalizer |
getExternalizer()
This method gets the externalizer instance used to build. |
Tag |
getInitialStateTag()
This method gets the current processor's Tag using getTag(), then extracts the State's subTags from it and iterates through those subTags to find and return the one that matches the tagName passed in as a string. |
java.lang.String |
getProcessorId()
Returns the value of the processorId property. |
java.lang.String |
getProcessorName()
Returns the value of the processorName property. |
Tag |
getStateTag(java.lang.String tagName)
This method gets the current processor's Tag using getTag(), then extracts the State's subTags from it and iterates through those subTags to find and return the one that matches the tagName passed in as a string. |
Vector |
getStateTagList()
Returns a vector of the state Tags for a processor. |
java.lang.String |
getStatus()
Returns the value of the status property. |
Tag |
getTag()
Returns the stateTag field. |
void |
initialize()
Initializes the Processor by looking for the "initial" state Tag, and then instantiating that Tag into an object, and setting it into the currentState. |
java.lang.Object |
initializeFrom(Tag aTag)
This method uses the processor's Tag attributes to initialize a Processor with an Id, the cleanEventQueueOnSwitch field, and a context. |
java.lang.Object |
initializeKeyedCollectionValueFrom(Tag aTag)
Initializes a collection of values from aTag. |
boolean |
isCacheable()
This method finds out if THIS particular object can be cached. |
boolean |
isCleanQueueOnSwitch()
Returns the value of the isCleanQueueOnSwitch property. |
void |
readExternal()
Initializes a dataElement with its external value. |
void |
readExternal(java.io.ObjectInput in)
Invokes the object creation from an ObjectInput. |
static java.lang.Object |
readObject(java.lang.String aName)
Returns an Object, which is instance of the operation named aName. |
void |
reinitialize()
This method will reinitialize THIS object. |
void |
removeExternal()
Removes the Externalizer. |
void |
resume()
Resumes a suspended processor. |
void |
setCleanQueueOnSwitch(boolean newCleanQueueOnSwitch)
Returns the value of the setCleanQueueOnSwitch property. |
void |
setContext(Context newContext)
Sets the value of the context property. |
void |
setCurrentState(State newState)
Sets the value of the currentState property. |
void |
setCurrentStateType(java.lang.String newStateType)
Sets the value of the CurrentStateType property. |
void |
setEventQueue(Queue newEventQueue)
Sets the value of the eventQueue property. |
static void |
setExternalizer(ProcessorExternalizer anExternalizer)
This method sets the externalizer instance used to build. |
void |
setProcessorId(java.lang.String newProcessorId)
Sets the value of the processorId property. |
void |
setProcessorName(java.lang.String newProcessorName)
Sets the value of the processorName property. |
void |
setStatus(java.lang.String newStatus)
Sets the value of the status property. |
void |
setTag(Tag aTag)
Sets the tag used to initialize a DSEState object to the tag passed in as a parameter. |
void |
suspend()
Suspends the Process. |
void |
terminate()
Provides a housekeeping processor for the notifier (DSEProcessor) instance. |
java.lang.String |
toString()
Returns a String representing the processor. |
Vector |
toStrings()
Returns a Vector with the String representation of the object. |
Vector |
toTags()
Returns a Vector with the object represented as a Tag. |
void |
writeExternal()
Writes this instance (converted into tags) to a file. |
void |
writeExternal(java.io.ObjectOutput out)
Provides concrete serialization handling for DSEProcessor. |
Methods inherited from class com.ibm.dse.base.DSENotifier |
addHandler,
getHandlersList,
getName,
removeHandler,
setName,
signalEvent,
signalEvent,
signalEvent |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static ProcessorExternalizer externalizer
protected State currentState
public static final java.lang.String NOT_INITIALIZED
public static final java.lang.String INITIALIZED
public static final java.lang.String RUNNING
public static final java.lang.String ABORTED
public static final java.lang.String SUSPENDED
public static final java.lang.String COMPLETED
public static final java.lang.String CHANGESTATE
protected java.lang.String status
protected Context context
protected java.lang.String processorId
protected java.lang.String processorName
protected Tag stateTag
protected Queue eventQueue
protected boolean cleanQueueOnSwitch
public static final java.lang.String STATUSCHANGEEVENT
public static final java.lang.String TERMINATEEVENT
protected transient ProcessorStatusChangedListener aProcessorStatusChangedListener
Constructor Detail |
public DSEProcessor()
public DSEProcessor(java.lang.String aName)
aName
- java.lang.Stringpublic DSEProcessor(java.lang.String aName, java.lang.String aTID)
aName
- java.lang.StringaTID
- java.lang.Stringpublic DSEProcessor(boolean mustRegister)
mustRegister
- booleanMethod Detail |
public void abort() throws DSEProcessorException
public void addProcessorStatusChangedListener(ProcessorStatusChangedListener param)
param
- com.ibm.dse.automaton.ProcessorStatusChangedListenerpublic void changeState(java.lang.String newState) throws DSEProcessorException
newState
- java.lang.Stringpublic void changeState(java.lang.String newState, boolean ignoreEntryActionsValue) throws DSEProcessorException
newState
- java.lang.StringignoreEntryActionsValue
- booleanpublic void cleanEventQueue()
public void close() throws DSEInvalidRequestException, DSEObjectNotFoundException
public void execute() throws DSEInvalidArgumentException, DSEProcessorException
public Externalizer externalizer() throws java.io.IOException
protected void fireProcessorStatusChangedEvent(ProcessorStatusChangedEvent event)
event
- com.ibm.dse.automaton.ProcessorStatusChangedEventprotected void fireProcessorTerminatedEvent(ProcessorTerminatedEvent event)
event
- com.ibm.dse.automaton.ProcessorTerminatedEventpublic Context getContext()
public State getCurrentState()
public java.lang.String getCurrentStateType()
public Queue getEventQueue()
public static ProcessorExternalizer getExternalizer() throws java.io.IOException
public Tag getInitialStateTag()
public java.lang.String getProcessorId()
public java.lang.String getProcessorName()
public Tag getStateTag(java.lang.String tagName)
tagName
- java.lang.Stringpublic Vector getStateTagList()
public java.lang.String getStatus()
public Tag getTag()
public void initialize() throws java.io.IOException, DSEException, DSEProcessorException
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException, DSEProcessorException
aTag
- com.ibm.dse.base.Tag Contains the name and attributes of the object to be created.public java.lang.Object initializeKeyedCollectionValueFrom(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tagpublic boolean isCacheable()
public boolean isCleanQueueOnSwitch()
public void readExternal() throws java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- java.io.ObjectInputpublic static java.lang.Object readObject(java.lang.String aName) throws java.io.IOException
The operation Externalizer reads the corresponding definition file to find the object.
This method throws an IOException if the externalizer is not initialized.
public void reinitialize()
public void removeExternal() throws java.io.IOException
public void resume()
public void setCleanQueueOnSwitch(boolean newCleanQueueOnSwitch)
newCleanQueueOnSwitch
- booleanpublic void setContext(Context newContext)
newContext
- com.ibm.dse.base.Contextpublic void setCurrentState(State newState)
newState
- Statepublic void setCurrentStateType(java.lang.String newStateType)
newStateType
- java.lang.Stringpublic void setEventQueue(Queue newEventQueue)
newEventQueue
- com.ibm.dse.automaton.Queuepublic static void setExternalizer(ProcessorExternalizer anExternalizer)
public void setProcessorId(java.lang.String newProcessorId)
newProcessorId
- java.lang.Stringpublic void setProcessorName(java.lang.String newProcessorName)
newProcessorName
- java.lang.Stringpublic void setStatus(java.lang.String newStatus)
newStatus
- java.lang.Stringpublic void setTag(Tag aTag)
newTag
- com.ibm.dse.base.Tagpublic void suspend()
public void terminate() throws DSEException, DSEProcessorException
public java.lang.String toString()
public Vector toStrings()
public Vector toTags() throws java.io.IOException
public void writeExternal() throws java.io.IOException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
out
- java.io.ObjectOutput
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |