public abstract class PrimitiveMessageDemux<E extends Enum<E>,M extends Message> extends Object implements MessageReceiver<M>
MessageReceiver
s.
Intended for de-multiplexing a message stream as calculated by
some derived class.Modifier and Type | Field and Description |
---|---|
protected EnumMap<E,MessageReceiver<? super M>> |
outlets |
protected Class<E> |
tagclass |
Constructor and Description |
---|
PrimitiveMessageDemux(Class<E> tagclass) |
Modifier and Type | Method and Description |
---|---|
MessageReceiver |
getReceiver(E tag) |
protected void |
receive(E tag,
M msg)
Auciliary internal method for performing the sending to a certain
MessageReceiver , 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,
MessageReceiver<? super M> rec) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
receive
protected final EnumMap<E extends Enum<E>,MessageReceiver<? super M extends Message>> outlets
public PrimitiveMessageDemux(Class<E> tagclass)
tagclass
- the class used as index to MessageReceiver
s.public void setReceiver(E tag, MessageReceiver<? super M> rec)
public MessageReceiver getReceiver(E tag)
protected void receive(E tag, M msg)
MessageReceiver
, as indicated by an enum value.MessageReceiver==null
. IS THIS WHAT WE WNAT ?? FIXME (__) !!!see also the complete user documentation .