com.googlecode.sarasvati.event
Class ExecutionEvent

java.lang.Object
  extended by com.googlecode.sarasvati.event.ExecutionEvent
Direct Known Subclasses:
ArcTokenEvent, NodeTokenEvent, ProcessEvent

public abstract class ExecutionEvent
extends Object


Constructor Summary
ExecutionEvent(Engine engine, ExecutionEventType eventType)
           
 
Method Summary
 ArcToken getArcToken()
          If this is an arc token related event, this returns the related arc token and null otherwise.
 Engine getEngine()
          Returns the engine which generated this event
 ExecutionEventType getEventType()
          Returns what type of event has occurred.
 String getExitArcsName()
          If this is either a node token event for either ExecutionEventType.NODE_TOKEN_SKIPPED or ExecutionEventType.NODE_TOKEN_COMPLETED, this will return the name of the arc (or arcs) on which execution will be proceeding.
 NodeToken getNodeToken()
          If this is a node token related event, this returns the related node token and null otherwise.
abstract  GraphProcess getProcess()
          Returns the process the event has occurred on.
 boolean isArcTokenEvent()
           
 boolean isNodeTokenEvent()
           
 boolean isProcessEvent()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionEvent

public ExecutionEvent(Engine engine,
                      ExecutionEventType eventType)
Method Detail

getEngine

public Engine getEngine()
Returns the engine which generated this event

Returns:
The engine which generated this event

getEventType

public ExecutionEventType getEventType()
Returns what type of event has occurred.

Returns:
The type of event

getProcess

public abstract GraphProcess getProcess()
Returns the process the event has occurred on.

Returns:
The process the event has occurred on.

getNodeToken

public NodeToken getNodeToken()
If this is a node token related event, this returns the related node token and null otherwise.

Returns:
If this is a node token related event, this returns the related node token and null otherwise.

getArcToken

public ArcToken getArcToken()
If this is an arc token related event, this returns the related arc token and null otherwise.

Returns:
If this is an arc token related event, this returns the related arc token and null otherwise.

getExitArcsName

public String getExitArcsName()
If this is either a node token event for either ExecutionEventType.NODE_TOKEN_SKIPPED or ExecutionEventType.NODE_TOKEN_COMPLETED, this will return the name of the arc (or arcs) on which execution will be proceeding.

Returns:
The arc name on which execution will proceed if this event is related to a node token skipped or node token completing event.

isProcessEvent

public boolean isProcessEvent()

isNodeTokenEvent

public boolean isNodeTokenEvent()

isArcTokenEvent

public boolean isArcTokenEvent()