public class ResumableFire extends FireMachine
action: propose FIRE_BEGIN START ---------------------------------------> BEGIN guard: FIRE_BEGIN is notified action: call fire(), propose FIRE_END BEGIN ---------------------------------------> FIRE_END guard: FIRE_BEGIN is not notified action: propose FIRE_BEGIN BEGIN ---------------------------------------> BEGIN
FireMachine.State
Modifier and Type | Field and Description |
---|---|
protected YieldAdapterIterator<java.lang.Iterable<metroIIcomm.Event.Builder>> |
_eventIterator
YieldAdapterIterator that is used to trigger actions of the wrapped
actor.
|
Constructor and Description |
---|
ResumableFire(Actor actor)
Constructs a ResumableFire by wrapping the actor.
|
Modifier and Type | Method and Description |
---|---|
void |
reset()
Stops and dispose any associated thread.
|
void |
startOrResume(java.util.LinkedList<metroIIcomm.Event.Builder> metroIIEventList)
Fires the wrapped actor in a resumable style.
|
actor, getState, getStateEvent, proposeStateEvent, setState, wrapup
protected YieldAdapterIterator<java.lang.Iterable<metroIIcomm.Event.Builder>> _eventIterator
public ResumableFire(Actor actor)
actor
- Actor to be wrappedpublic void startOrResume(java.util.LinkedList<metroIIcomm.Event.Builder> metroIIEventList) throws IllegalActionException
metroIIEventList
- A list of MetroII events.IllegalActionException
- if the associated action (e.g. firing) is not permitted.public void reset()
reset
in interface StartOrResumable
reset
in class FireMachine