|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.jinahya.util.fsm.Task
com.googlecode.jinahya.util.fsm.SwitchTask
public abstract class SwitchTask
Task for switching conditions.
| Constructor Summary | |
|---|---|
SwitchTask(String id,
TransitionMatcher[] onMatchers,
TransitionMatcher[] offMatchers)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
perform(TransitionContext context)
Perform desired actions for given transition. |
protected abstract void |
performOff(TransitionContext context)
Performs for switching off. |
protected abstract void |
performOn(TransitionContext context)
Performs for switching on. |
void |
prepare(TransitionContext context)
|
protected abstract void |
prepareOff(TransitionContext context)
Prepares for switching off. |
protected abstract void |
prepareOn(TransitionContext context)
Prepares for switching on. |
| Methods inherited from class com.googlecode.jinahya.util.fsm.Task |
|---|
getId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SwitchTask(String id,
TransitionMatcher[] onMatchers,
TransitionMatcher[] offMatchers)
id - task idonMatchers - matchers for switching on; none null; none emptyoffMatchers - matchers for switching off; none null; none empty| Method Detail |
|---|
public void prepare(TransitionContext context)
throws FSMException
prepare in class TaskFSMException
protected abstract void prepareOn(TransitionContext context)
throws FSMException
context - context
FSMException - if an error occurs.
protected abstract void prepareOff(TransitionContext context)
throws FSMException
context - context
FSMException - if an error occurs.
public void perform(TransitionContext context)
throws FSMException
Tasktransition.
perform in class Taskcontext - transition context
FSMException - if an error occurs.
protected abstract void performOn(TransitionContext context)
throws FSMException
context - context
FSMException - if an error occurs.
protected abstract void performOff(TransitionContext context)
throws FSMException
context - context
FSMException - if an error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||