Package eu.bandm.tools.message
Class MessageDemux.ByKind<M extends Message>
- All Implemented Interfaces:
MessageReceiver<M>
A
MessageDemux
which sorts messages by their kind.
This class is an instantiation of MessageDemux
with
Message.Kind
as index type. So its map can contain one
MessageReceiver
for each value of this enumeration.
Every message is propagated to the receiver indicated by
Message.getKind()
.-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.tools.message.MessageDemux
MessageDemux.All<E extends Enum<E>,
M extends Message>, MessageDemux.ByKind<M extends Message> -
Field Summary
Fields inherited from class eu.bandm.tools.message.PrimitiveMessageDemux
outlets, tagclass
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected EnumSet
<Message.Kind> Has to be re-defined by derived classes to calculate the set of enum items which indicate the receivers the message shall be propagated to.Methods inherited from class eu.bandm.tools.message.MessageDemux
all, byKind, receive
Methods inherited from class eu.bandm.tools.message.PrimitiveMessageDemux
getReceiver, receive, setReceiver
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
ifSubcriticalThen, ifSubcriticalThen, ifSubcriticalThenElse
-
Constructor Details
-
ByKind
public ByKind()Only constructor.
-
-
Method Details
-
getOutputTags
Has to be re-defined by derived classes to calculate the set of enum items which indicate the receivers the message shall be propagated to.This is the only method which needs to be overrideden by a subclass to be operative.
- Specified by:
getOutputTags
in classMessageDemux<Message.Kind,
M extends Message> - Parameters:
m
- the message to be sent.- Returns:
- all tags to which this message shall be sent.
-