se.ericsson.eto.norarc.javaframe
Class Mediator

java.lang.Object
  extended byse.ericsson.eto.norarc.javaframe.Mediator
All Implemented Interfaces:
Addressable, java.io.Serializable
Direct Known Subclasses:
MultiCastMediator, OutputEdgeMediator, RouterMediator, SimpleRouterMediator

public class Mediator
extends java.lang.Object
implements Addressable, java.io.Serializable

The superclass of those objects that represent the concrete message interfaces between ActiveObjects

See Also:
Serialized Form

Field Summary
 Addressable address
           
 
Constructor Summary
Mediator()
           
 
Method Summary
 void addAddress(Addressable newAddress)
          Sets the address of this Mediator to the given value.
 void forward(Message sig)
          Forwards the specified signal to the Addressable object refered to by the address reference.
 Addressable getAddress()
          Return the value of the address reference
 void input(Message sig)
          Used at the edge of the system to input the specified signal.
 java.lang.String mediatorName()
          Return the name of the actual Mediator class
 void removeAddress(Addressable med)
          Removes the specified {link Mediator}
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

address

public Addressable address
Constructor Detail

Mediator

public Mediator()
Method Detail

addAddress

public void addAddress(Addressable newAddress)
                throws java.lang.IllegalArgumentException
Sets the address of this Mediator to the given value.

Parameters:
newAddress - refers a StateMachine or another Mediator.
Throws:
java.lang.IllegalArgumentException

removeAddress

public void removeAddress(Addressable med)
Removes the specified {link Mediator}

Parameters:
med - The mediator to be removed from the mediatorList.

getAddress

public final Addressable getAddress()
Return the value of the address reference


mediatorName

public final java.lang.String mediatorName()
Return the name of the actual Mediator class


forward

public void forward(Message sig)
Forwards the specified signal to the Addressable object refered to by the address reference. It is assumed that the address of this Mediator has been given a value. If not, a NullPointerException is thrown.

Specified by:
forward in interface Addressable

input

public final void input(Message sig)
                 throws java.lang.IllegalArgumentException
Used at the edge of the system to input the specified signal. The signal will be forwarded into the system.

Parameters:
sig - is assumed to be not null. If not, a IllegalArgumentException is thrown.
Throws:
java.lang.IllegalArgumentException