Package eu.bandm.tools.message
Class PrimitiveMessageDemux<E extends Enum<E>,M extends Message>
java.lang.Object
eu.bandm.tools.message.PrimitiveMessageDemux<E,M>
- All Implemented Interfaces:
MessageReceiver<M>
- Direct Known Subclasses:
MessageDemux
public abstract class PrimitiveMessageDemux<E extends Enum<E>,M extends Message>
extends Object
implements MessageReceiver<M>
Auxiliary class administrating an enumeration type and a map from
this type to optional
MessageReceiver
s.
Intended for de-multiplexing a message stream as calculated by
some derived class.-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
PrimitiveMessageDemux
(Class<E> tagclass) Only constructor. -
Method Summary
Modifier and TypeMethodDescription@Opt MessageReceiver<? super M>
getReceiver
(E tag) Get the receiver for one particular tag.protected void
Auxiliary internal method for performing the sending to a certainMessageReceiver
, as indicated by an enum value.
This method is called by some derived class, after it has determined the applicable enum value or value set.void
setReceiver
(E tag, @Opt MessageReceiver<? super M> rec) Set the receiver for one particular tag.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.bandm.tools.message.MessageReceiver
receive
-
Field Details
-
outlets
Internal directory of the different drains per tag. -
tagclass
Configuration value holding the class used for tagging.
-
-
Constructor Details
-
PrimitiveMessageDemux
Only constructor.- Parameters:
tagclass
- the class used as index to theMessageReceiver
s.
-
-
Method Details
-
setReceiver
Set the receiver for one particular tag. Setting null is allowed and acts like aMessageDisposer
. -
getReceiver
Get the receiver for one particular tag. -
receive
Auxiliary internal method for performing the sending to a certainMessageReceiver
, as indicated by an enum value.
This method is called by some derived class, after it has determined the applicable enum value or value set.
-