com.googlecode.jinahya.util.fsm
Class Machine

java.lang.Object
  extended by com.googlecode.jinahya.util.fsm.Machine

public class Machine
extends Object

Author:
Jin Kwon

Constructor Summary
Machine(MachineContext context)
          Creates a new instance.
 
Method Summary
 State getState()
          Returns current state.
protected  boolean isAllowed(Transition transition)
           
 boolean isFinished()
           
protected  boolean isFinishing(Transition transition)
           
 boolean isStarted()
           
protected  boolean isStarting(Transition transition)
           
 void setState(State state)
          Sets state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Machine

public Machine(MachineContext context)
Creates a new instance.

Parameters:
context - task context
Method Detail

getState

public State getState()
Returns current state.

Returns:
state

setState

public void setState(State state)
              throws FSMException
Sets state.

Parameters:
state - state
Throws:
FSMException

isStarted

public final boolean isStarted()
Returns:

isFinished

public final boolean isFinished()
Returns:

isStarting

protected boolean isStarting(Transition transition)
Parameters:
transition -
Returns:
true

isAllowed

protected boolean isAllowed(Transition transition)
Parameters:
transition -
Returns:
true

isFinishing

protected boolean isFinishing(Transition transition)
Parameters:
transition -
Returns:
false


Copyright © 2011. All Rights Reserved.