com.googlecode.jinahya.util.fsm
Class MachineContext

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

public abstract class MachineContext
extends Object

Author:
Jin Kwon

Constructor Summary
protected MachineContext(TaskContext taskContext)
          Creates a new instance.
 
Method Summary
protected abstract  void perform(TransitionContext context, Task... tasks)
          Perform tasks.
 void transited(Transition transition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MachineContext

protected MachineContext(TaskContext taskContext)
Creates a new instance.

Parameters:
taskContext - tasks
Method Detail

transited

public void transited(Transition transition)
               throws FSMException
Parameters:
transition - transition
Throws:
FSMException

perform

protected abstract void perform(TransitionContext context,
                                Task... tasks)
                         throws FSMException
Perform tasks. Each task can be performed concurrently. Implementations must guarantee that all tasks performed before this method returns.

Parameters:
context - transition context
tasks - tasks to be performed
Throws:
FSMException - if an error occurs


Copyright © 2011. All Rights Reserved.