|
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.DSENotifier
com.ibm.btt.automaton.DSEProcessor
public class DSEProcessor
This class is the default implementation of a Processor.
Events fired by a DSEProcessor:
Field Summary | |
---|---|
static java.lang.String |
ABORTED
|
protected ProcessorStatusChangedListener |
aProcessorStatusChangedListener
|
static java.lang.String |
CHANGESTATE
|
static java.lang.String |
CLEAN_EVENTS_QUEUE_ON_SWITCH
|
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.btt.base.DSENotifier |
---|
handlersList, name |
Fields inherited from interface com.ibm.btt.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()
Ends the flow of the processor using the current State. |
void |
addProcessorStatusChangedListener(ProcessorStatusChangedListener param)
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 |
clearKeyedCollection(boolean keepKCollStatus,
boolean clearOnlyValues)
This method clears both the typed and non-typed elements in the processor context. |
void |
close()
Unchains the context and closes the action, which releases the currentState and eventQueue objects. |
void |
execute()
Executes the Processor. |
Externalizer |
externalizer()
Gets the externalizer instance used to build the processor. |
protected void |
fireProcessorStatusChangedEvent(ProcessorStatusChangedEvent event)
Supports listener events. |
protected void |
fireProcessorTerminatedEvent(ProcessorTerminatedEvent event)
Supports listener events. |
Context |
getContext()
Returns the value of the context property. |
State |
getCurrentState()
Returns the value of the currentState property. |
java.lang.String |
getCurrentStateType()
Returns the current State's Type. |
Queue |
getEventQueue()
Returns the value of the eventQueue property. |
static ProcessorExternalizer |
getExternalizer()
Gets the externalizer instance used to build the processor. |
Tag |
getInitialStateTag()
Gets the current processor's Tag using getTag(), 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. |
java.util.Map |
getRefServiceTags()
|
Service |
getService(java.lang.String aServiceName)
Returns the service named aServiceName from the processor. |
Tag |
getStateTag(java.lang.String tagName)
Gets the current processor's Tag using getTag(), 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, instantiates that Tag into an object, and sets it into the currentState. |
java.lang.Object |
initializeFrom(Tag aTag)
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()
Checks whether 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()
Reinitializes 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)
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.btt.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 |
Methods inherited from interface com.ibm.btt.automaton.Processor |
---|
addHandler, getHandlersList, signalEvent |
Methods inherited from interface com.ibm.btt.base.Cacheable |
---|
getName |
Methods inherited from interface com.ibm.btt.base.Externalizable |
---|
getName, setName |
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
public static final java.lang.String CLEAN_EVENTS_QUEUE_ON_SWITCH
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
abort
in interface Processor
DSEProcessorException
public void addProcessorStatusChangedListener(ProcessorStatusChangedListener param)
addProcessorStatusChangedListener
in interface Processor
param
- com.ibm.btt.automaton.ProcessorStatusChangedListenerpublic void changeState(java.lang.String newState) throws DSEProcessorException
newState
- java.lang.String
DSEProcessorException
public void changeState(java.lang.String newState, boolean ignoreEntryActionsValue) throws DSEProcessorException
changeState
in interface Processor
newState
- java.lang.StringignoreEntryActionsValue
- boolean
DSEProcessorException
public void cleanEventQueue()
public void clearKeyedCollection(boolean keepKCollStatus, boolean clearOnlyValues) throws java.io.IOException
keepKCollStatus
- boolean (false - clear also the context kColl attributes; true
- keep the context kColl attributes and clear only the kColl
data elements)clearOnlyValues
- boolean (false - clear all attributes of the context kColl
data elements; true - clear only kColl data elements values)
java.io.IOException
- - this exception occurs if the keyed collection is not
defined neither in the generic files nor in the self
defined filepublic void close() throws DSEInvalidRequestException, DSEObjectNotFoundException
close
in interface Processor
DSEInvalidRequestException
DSEObjectNotFoundException
public void execute() throws DSEInvalidArgumentException, DSEProcessorException
execute
in interface Executable
DSEInvalidRequestException
DSEObjectNotFoundException
DSEInvalidArgumentException
DSEProcessorException
public Externalizer externalizer() throws java.io.IOException
java.lang.IOException
java.io.IOException
protected void fireProcessorStatusChangedEvent(ProcessorStatusChangedEvent event)
event
- com.ibm.btt.automaton.ProcessorStatusChangedEventprotected void fireProcessorTerminatedEvent(ProcessorTerminatedEvent event)
event
- com.ibm.btt.automaton.ProcessorTerminatedEventpublic Context getContext()
getContext
in interface Processor
public State getCurrentState()
getCurrentState
in interface Processor
public java.lang.String getCurrentStateType()
getCurrentStateType
in interface Processor
public Queue getEventQueue()
getEventQueue
in interface Processor
public static ProcessorExternalizer getExternalizer() throws java.io.IOException
java.io.IOException
public Tag getInitialStateTag()
getInitialStateTag
in interface Processor
public java.lang.String getProcessorId()
getProcessorId
in interface Processor
public java.lang.String getProcessorName()
getProcessorName
in interface Processor
public Tag getStateTag(java.lang.String tagName)
getStateTag
in interface Processor
tagName
- java.lang.String
public Vector getStateTagList()
getStateTagList
in interface Processor
public java.lang.String getStatus()
getStatus
in interface Processor
public Tag getTag()
getTag
in interface Processor
public void initialize() throws java.io.IOException, DSEException, DSEProcessorException
initialize
in interface Processor
java.io.IOException
DSEException
DSEProcessorException
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException, DSEProcessorException
This method is an Externalizable interface method.
aTag
- com.ibm.btt.base.Tag Contains the name and attributes of the
object to be created.
java.io.IOException
- The object can not be created.
DSEException
DSEProcessorException
public java.lang.Object initializeKeyedCollectionValueFrom(Tag aTag) throws java.io.IOException
aTag
- com.ibm.btt.base.Tag
java.io.IOException
public boolean isCacheable()
isCacheable
in interface Cacheable
public boolean isCleanQueueOnSwitch()
public void readExternal() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception of some sort has occurred.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- java.io.ObjectInput
java.io.IOException
java.lang.ClassNotFoundException
public static java.lang.Object readObject(java.lang.String aName) throws java.io.IOException
This method is an Externalizable interface method.
java.io.IOException
public void reinitialize()
reinitialize
in interface Cacheable
public void removeExternal() throws java.io.IOException
java.lang.IOException
java.io.IOException
public void resume()
resume
in interface Processor
public void setCleanQueueOnSwitch(boolean newCleanQueueOnSwitch)
newCleanQueueOnSwitch
- booleanpublic void setContext(Context newContext)
setContext
in interface Processor
newContext
- com.ibm.btt.base.Contextpublic void setCurrentState(State newState)
setCurrentState
in interface Processor
newState
- Statepublic void setCurrentStateType(java.lang.String newStateType)
setCurrentStateType
in interface Processor
newStateType
- java.lang.Stringpublic void setEventQueue(Queue newEventQueue)
newEventQueue
- com.ibm.btt.automaton.Queuepublic static void setExternalizer(ProcessorExternalizer anExternalizer)
public void setProcessorId(java.lang.String newProcessorId)
setProcessorId
in interface Processor
newProcessorId
- java.lang.Stringpublic void setProcessorName(java.lang.String newProcessorName)
setProcessorName
in interface Processor
newProcessorName
- java.lang.Stringpublic void setStatus(java.lang.String newStatus)
setStatus
in interface Processor
newStatus
- java.lang.Stringpublic void setTag(Tag aTag)
setTag
in interface Processor
newTag
- com.ibm.btt.base.Tagpublic void suspend()
suspend
in interface Processor
public void terminate() throws DSEException, DSEProcessorException
Subclasses should overwrite this implementation to perform the actions required to release the resources acquired by the notifier.
terminate
in interface Processor
terminate
in interface Notifier
terminate
in class DSENotifier
DSEException
com.ibm.btt.base.DSEProcessorException
DSEProcessorException
public java.lang.String toString()
toString
in class java.lang.Object
public Vector toStrings()
public Vector toTags() throws java.io.IOException
java.io.IOException
public void writeExternal() throws java.io.IOException
java.io.IOException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- java.io.ObjectOutput
java.io.IOException
public java.util.Map getRefServiceTags()
public Service getService(java.lang.String aServiceName) throws DSEObjectNotFoundException
This method throws a DSEObjectNotFoundException if the service is not found.
DSEObjectNotFoundException
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |