public abstract class SwitchTask extends Task
| Constructor and Description |
|---|
SwitchTask(java.lang.String id,
TransitionMatcher[] onMatchers,
TransitionMatcher[] offMatchers)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
perform(TransitionContext context)
Performs 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)
Prepares for given
context. |
protected abstract void |
prepareOff(TransitionContext context)
Prepares for switching off.
|
protected abstract void |
prepareOn(TransitionContext context)
Prepares for switching on.
|
public SwitchTask(java.lang.String id,
TransitionMatcher[] onMatchers,
TransitionMatcher[] offMatchers)
id - task idonMatchers - matchers for switching on; none null; none emptyoffMatchers - matchers for switching off; none null; none emptypublic void prepare(TransitionContext context) throws FSMException
Taskcontext.prepare in class Taskcontext - transition contextFSMException - if an error occurs.protected abstract void prepareOn(TransitionContext context) throws FSMException
context - contextFSMException - if an error occurs.protected abstract void prepareOff(TransitionContext context) throws FSMException
context - contextFSMException - if an error occurs.public void perform(TransitionContext context) throws FSMException
Tasktransition.perform in class Taskcontext - transition contextFSMException - if an error occurs.protected abstract void performOn(TransitionContext context) throws FSMException
context - contextFSMException - if an error occurs.protected abstract void performOff(TransitionContext context) throws FSMException
context - contextFSMException - if an error occurs.Copyright © 2011. All Rights Reserved.