se.ericsson.eto.norarc.javaframe
Class RouterMediator

java.lang.Object
  extended byse.ericsson.eto.norarc.javaframe.Mediator
      extended byse.ericsson.eto.norarc.javaframe.RouterMediator
All Implemented Interfaces:
Addressable, java.io.Serializable

public class RouterMediator
extends Mediator

The RouterMediator has a Router state machine associated. The router mediator will merely let the associated Router do the actual routing

See Also:
SimpleRouterMediator, Router, Serialized Form

Field Summary
(package private)  Router mediatorRouter
           
 
Fields inherited from class se.ericsson.eto.norarc.javaframe.Mediator
address
 
Constructor Summary
RouterMediator(Router router)
          Associates the given Router with this RouterMediator
 
Method Summary
 void addAddress(Addressable newMediator)
          Adds the specified Mediator to the mediatorList.
 void forward(Message sig)
          Forwards the specified signal to the Addressable object refered to by the mediatorrouter reference.
 Router getRouterMachine()
           
 
Methods inherited from class se.ericsson.eto.norarc.javaframe.Mediator
getAddress, input, mediatorName, removeAddress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mediatorRouter

Router mediatorRouter
Constructor Detail

RouterMediator

public RouterMediator(Router router)
               throws java.lang.IllegalArgumentException
Associates the given Router with this RouterMediator

Parameters:
router - Assumed to be not null. If not, an IllegalArgumentException is thrown.
Method Detail

getRouterMachine

public final Router getRouterMachine()
Returns:
reference to the associated Router state machine

addAddress

public final void addAddress(Addressable newMediator)
                      throws java.lang.IllegalArgumentException
Adds the specified Mediator to the mediatorList.

Overrides:
addAddress in class Mediator
Parameters:
newMediator - Assumed to be not null. If not, an IllegalArgumentException is thrown.
Throws:
java.lang.IllegalArgumentException

forward

public final void forward(Message sig)
Forwards the specified signal to the Addressable object refered to by the mediatorrouter reference. Invariant: mediatorRouter != null

Specified by:
forward in interface Addressable
Overrides:
forward in class Mediator