Package eu.bandm.tools.message
Class MessageDemux.ByKind<M extends Message>
- All Implemented Interfaces:
MessageReceiver<M>
A
This class is an instantiation of
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
-
Constructor Details
-
ByKind
public ByKind()Only constructor.
-
-
Method Details
-
getOutputTags
Description copied from class:MessageDemux
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.
Only method which needs to be re-defined by a subclass to be operative.- Specified by:
getOutputTags
in classMessageDemux<Message.Kind,
M extends Message>
-