se.ericsson.eto.norarc.javaframe
Class MultiCastMediator
java.lang.Object
se.ericsson.eto.norarc.javaframe.Mediator
se.ericsson.eto.norarc.javaframe.MultiCastMediator
- All Implemented Interfaces:
- Addressable, java.io.Serializable
- public class MultiCastMediator
- extends Mediator
a MultiCastMediator is a Mediator that replicates the received Message and
sends it to all its outgoing connections (which are organized in a list)
- See Also:
Message
,
Serialized Form
Fields inherited from class se.ericsson.eto.norarc.javaframe.Mediator |
address |
Constructor Summary |
MultiCastMediator()
Creates a new MultiCastmediator object with a mediatorList. |
Method Summary |
void |
addAddress(Addressable newMediator)
Adds the specified {link Mediator} to the mediatorList. |
void |
forward(Message sig)
Duplicates and forwards the specified signal to all the Mediator
objects refered to in the mediatorList. |
void |
removeAddress(Addressable med)
Removes the specified {link Mediator} from the mediatorList. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mediatorList
public java.util.LinkedList mediatorList
MultiCastMediator
public MultiCastMediator()
- Creates a new MultiCastmediator object with a mediatorList.
forward
public void forward(Message sig)
- Duplicates and forwards the specified signal to all the Mediator
objects refered to in the mediatorList.
- Specified by:
forward
in interface Addressable
- Overrides:
forward
in class Mediator
addAddress
public void addAddress(Addressable newMediator)
throws java.lang.IllegalArgumentException
- Adds the specified {link 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
removeAddress
public void removeAddress(Addressable med)
- Removes the specified {link Mediator} from the mediatorList.
- Overrides:
removeAddress
in class Mediator
- Parameters:
med
- The mediator to be removed from the mediatorList.