|
||||||||||
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
se.ericsson.eto.norarc.javaframe.Router
A Router is a special StateMachine that performs routing of
Message
s to one in a list of Mediator
s.
Field Summary | |
java.util.LinkedList |
mediatorList
|
Fields inherited from class se.ericsson.eto.norarc.javaframe.StateMachine |
currentMessage, currentState, inSchedulerList, messageBox, myScheduler, nextFSM, saveQueue, wantedScheduler |
Fields inherited from class se.ericsson.eto.norarc.javaframe.ActiveObject |
activeObjectName, owner |
Constructor Summary | |
Router(Scheduler sched)
Associates this Router with the given Scheduler . |
Method Summary | |
void |
addAddress(Addressable newMediator)
Adds a Mediator to the list of routing targets. |
protected void |
exec(Message sig)
The execution utility called by the scheduling process. |
protected void |
execRouterTrans(Message sig)
Normally the Router has only a single transition executed. |
protected void |
execStartTransition()
Default execStartTransition is empty. |
Mediator |
getAddress()
Overriding the general method by simply taking the first Mediator of the list |
protected void |
output(Message sig,
Mediator receiver)
Outputs sig to the receiver. |
Methods inherited from class se.ericsson.eto.norarc.javaframe.StateMachine |
forward, getCurrentMessage, getCurrentState, getScheduler, init, moveStateMachine, restart |
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 |
public java.util.LinkedList mediatorList
Constructor Detail |
public Router(Scheduler sched)
Scheduler
.
Method Detail |
public void addAddress(Addressable newMediator) throws java.lang.IllegalArgumentException
newMediator
- Assumed to be not null.
If not, an IllegalArgumentException is thrown.
java.lang.IllegalArgumentException
public Mediator getAddress()
Mediator
of the list
protected void execRouterTrans(Message sig)
protected void output(Message sig, Mediator receiver)
sig
- the Message that will be routed onreceiver
- the Mediator that will receive the sigprotected void exec(Message sig)
StateMachine
exchange with currentState.exec(sig, this);
exec
in class StateMachine
sig
- Invariant: sig != nullprotected void execStartTransition()
execStartTransition
in class StateMachine
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |