IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.automaton
Interface Action

All Superinterfaces:
Notifier
All Known Implementing Classes:
DSEAction

public interface Action
extends Notifier

Interface for Action which is an action to do in a State.


Method Summary
 void close()
          This method is for closing actions and releasing the processor and context objects.
 void close(boolean wasChained)
          This method is for actions that had their context's chained to the processor's.
 boolean evaluateGuardCondition(GuardCondition gc)
          Evaluate the given guardCondition.
 void execute()
          This is invoked to do whatever this Action is supposed to do.
 Context getContext()
          Get the context of this Action
 Vector getGuardConditions()
          Return a Vector containing the GuardConditions for this Action
 java.lang.String getName()
          This method returns the name attribute inherited from DSENotifier.
 java.util.Hashtable getParms()
          Returns a hashtable containing the parameters in this Action
 Processor getProcessor()
          Returns the Processor who owns this Action
 DSEEventObject getSourceEvent()
          Returns the value of the sourceEvent property.
 void preProcess()
          This is invoked just before the execute method.
 void setContext(Context aContext)
          Sets the context to the Action
 void setGuardConditions(Vector guardConditions)
          Associates the action with a Vector of GuardConditions.
 void setName(java.lang.String notifierName)
          This method sets the name attribute inherited from DSENotifier.
 void setParms(java.util.Hashtable parms)
          Associates the action with a hashtable of parameters
 void setProcessor(Processor aProcessor)
          Sets the processor who owns this Action
 void setSourceEvent(DSEEventObject newSourceEvent)
          Sets the value of the sourceEvent property.
 
Methods inherited from interface com.ibm.dse.base.Notifier
addHandler, getHandlersList, removeHandler, signalEvent, signalEvent, terminate
 

Method Detail

close

public void close()
This method is for closing actions and releasing the processor and context objects.


close

public void close(boolean wasChained)
This method is for actions that had their context's chained to the processor's. It unchains the context and closes the action, releasing the processor and context objects.

Parameters:
wasChained - boolean

evaluateGuardCondition

public boolean evaluateGuardCondition(GuardCondition gc)
Evaluate the given guardCondition.

Parameters:
gc - com.ibm.dse.automaton.GuardCondition
Returns:
boolean

execute

public void execute()
             throws java.lang.Exception
This is invoked to do whatever this Action is supposed to do.

Throws:
java.lang.Exception - The implementor of this class must decide when to throw an exception occurred to the automaton.

getContext

public Context getContext()
Get the context of this Action

Returns:
com.ibm.dse.base.Context

getGuardConditions

public Vector getGuardConditions()
Return a Vector containing the GuardConditions for this Action

Returns:
com.ibm.dse.base.Vector

getName

public java.lang.String getName()
This method returns the name attribute inherited from DSENotifier. Note: this is NOT the name of the action.

Specified by:
getName in interface Notifier
Returns:
java.lang.String

getParms

public java.util.Hashtable getParms()
Returns a hashtable containing the parameters in this Action

Returns:
java.util.Hashtable

getProcessor

public Processor getProcessor()
Returns the Processor who owns this Action

Returns:
com.ibm.dse.automaton.Processor

getSourceEvent

public DSEEventObject getSourceEvent()
Returns the value of the sourceEvent property.

Returns:
com.ibm.dse.base.DSEEventObject

preProcess

public void preProcess()
                throws java.lang.Exception
This is invoked just before the execute method.

Throws:
java.lang.Exception - The implementor of this class must decide when to throw an exception occurred to the automaton.

setContext

public void setContext(Context aContext)
Sets the context to the Action

Parameters:
aContext - com.ibm.dse.base.Context

setGuardConditions

public void setGuardConditions(Vector guardConditions)
Associates the action with a Vector of GuardConditions.

Parameters:
guardConditions - com.ibm.dse.base.Vector

setName

public void setName(java.lang.String notifierName)
This method sets the name attribute inherited from DSENotifier. Note: this is NOT the name of the action.

Specified by:
setName in interface Notifier
Parameters:
notifierName - java.lang.String

setParms

public void setParms(java.util.Hashtable parms)
Associates the action with a hashtable of parameters


setProcessor

public void setProcessor(Processor aProcessor)
Sets the processor who owns this Action

Parameters:
aProcessor - com.ibm.dse.automaton.Processor

setSourceEvent

public void setSourceEvent(DSEEventObject newSourceEvent)
Sets the value of the sourceEvent property.

Parameters:
newSourceEvent - com.ibm.dse.base.DSEEventObject

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005