com.googlecode.sarasvati
Interface GuardResult

All Known Implementing Classes:
AcceptTokenGuardResult, DiscardTokenGuardResult, SkipNodeGuardResult

public interface GuardResult

A GuardResult is returned from Node.guard(Engine, NodeToken) to indicate what should be done with an incoming NodeToken. Most of this is imparted by which GuardAction is returned. In the cases of GuardAction.AcceptToken and GuardAction.DiscardToken, no further information is required. In the case of GuardAction.SkipNode, the guard may wish to select which arcs to exit, based on arc name.

Author:
Paul Lorenz

Method Summary
 String getExitArcForSkip()
          If GuardAction.SkipNode is returned from Node.guard(Engine, NodeToken), it may indicate an arc name other than the default on which to exit.
 GuardAction getGuardAction()
          Indicates which GuardAction has been selected.
 

Method Detail

getGuardAction

GuardAction getGuardAction()
Indicates which GuardAction has been selected.

Returns:
The GuardAction selected.

getExitArcForSkip

String getExitArcForSkip()
If GuardAction.SkipNode is returned from Node.guard(Engine, NodeToken), it may indicate an arc name other than the default on which to exit. This can be useful for decision logic.

Returns:
The name of the arc or arcs on which to exit this node.