com.googlecode.jinahya.util.fsm
Class Task

java.lang.Object
  extended by com.googlecode.jinahya.util.fsm.Task
Direct Known Subclasses:
SwitchTask

public abstract class Task
extends Object

Author:
Jin Kwon

Constructor Summary
protected Task(String id)
          Creates a new instance.
 
Method Summary
 String getId()
          Returns identifier.
abstract  void perform(TransitionContext context)
          Perform desired actions for given transition.
abstract  void prepare(TransitionContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Task

protected Task(String id)
Creates a new instance.

Parameters:
id -
Method Detail

getId

public final String getId()
Returns identifier.

Returns:
id

prepare

public abstract void prepare(TransitionContext context)
                      throws FSMException
Parameters:
context -
Throws:
FSMException

perform

public abstract void perform(TransitionContext context)
                      throws FSMException
Perform desired actions for given transition.

Parameters:
context - transition context
Throws:
FSMException - if an error occurs.


Copyright © 2011. All Rights Reserved.