|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.ericsson.eto.norarc.javaframe.ActiveObject
se.ericsson.eto.norarc.javaframe.StateMachine
The StateMachine is a finite State
machine that is executed by the associated Scheduler
Field Summary | |
protected Message |
currentMessage
|
protected State |
currentState
|
protected boolean |
inSchedulerList
|
protected MailBox |
messageBox
|
protected Scheduler |
myScheduler
|
protected StateMachine |
nextFSM
|
protected MailBox |
saveQueue
|
protected Scheduler |
wantedScheduler
|
Fields inherited from class se.ericsson.eto.norarc.javaframe.ActiveObject |
activeObjectName, owner |
Constructor Summary | |
StateMachine(Scheduler scheduler)
Create a new StateMachine. |
Method Summary | |
protected void |
exec(Message sig)
The treatment by this StateMachine of the next message from the mailbox. |
protected abstract void |
execStartTransition()
Code to be executed at startup of this StateMachine. |
void |
forward(Message sig)
Forwards the received message to the messageBox of this StateMachine. |
Message |
getCurrentMessage()
Get the current Message of this StateMachine. |
State |
getCurrentState()
Get the current State of this StateMachine. |
Scheduler |
getScheduler()
Get the scheduler running this StateMachine. |
protected void |
init()
To be overridden by programmer. |
void |
moveStateMachine(Scheduler aScheduler)
Move this StateMachine to the new Scheduler given by the parameter.
|
void |
restart()
Restart this StateMachine. |
Methods inherited from class se.ericsson.eto.norarc.javaframe.ActiveObject |
activeObjectName, setActiveObjectName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected MailBox messageBox
protected MailBox saveQueue
protected State currentState
protected Message currentMessage
protected transient Scheduler myScheduler
protected transient StateMachine nextFSM
protected transient boolean inSchedulerList
protected transient Scheduler wantedScheduler
Constructor Detail |
public StateMachine(Scheduler scheduler)
scheduler
- The Scheduler
that runs this StateMachine.
Initially the associated Scheduler may be null.Method Detail |
protected void init()
public final void moveStateMachine(Scheduler aScheduler)
Scheduler
given by the parameter.
New and/or current scheduler (myScheduler) can be null.
If myScheduler == null, the movement is done immediately, else
the thread of myScheduler will move the FSM (in run()).
aScheduler
- The Scheduler to which this StateMachine wants to gopublic final Scheduler getScheduler()
public final State getCurrentState()
public final Message getCurrentMessage()
public final void forward(Message sig)
forward
in interface Addressable
sig
- Invariant: sig != nullprotected abstract void execStartTransition()
public void restart()
protected void exec(Message sig)
sig
- Invariant: sig != null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |