org.discotools.fsm
Class FsmAction

java.lang.Object
  extended by org.discotools.fsm.FsmAction
Direct Known Subclasses:
FsmMatcherAction

public class FsmAction
extends Object


Field Summary
protected  String label
           
protected  String name
           
 
Constructor Summary
FsmAction(String name)
           
FsmAction(String name, String label)
           
 
Method Summary
 boolean execute(Object... params)
          Execute action command.
 String getLabel()
           
 String getName()
           
 boolean handles(String command)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name

label

protected String label
Constructor Detail

FsmAction

public FsmAction(String name)

FsmAction

public FsmAction(String name,
                 String label)
Method Detail

getName

public String getName()

getLabel

public String getLabel()

handles

public boolean handles(String command)

execute

public boolean execute(Object... params)
                throws FsmException
Execute action command.

NOTE: This method is called BEFORE any changes to the FSM is made.

The transition to next state is only permissible if this method returns true.

For more information about transitions, see the Fsm documentation.

Parameters:
params -
Returns:
true if action was successfully executed.
Throws:
FsmException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 DISCO Foundation. All Rights Reserved.