Package eu.bandm.tools.message
Class MessageDemux.ByKind<M extends Message>
- Type Parameters:
M- the type of the messages
- All Implemented Interfaces:
MessageReceiver<M>
A message de-multiplexer 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected EnumSet<Message.Kind> 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, receiveMethods inherited from class eu.bandm.tools.message.PrimitiveMessageDemux
getReceiver, receive, setReceiverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.bandm.tools.message.MessageReceiver
ifSubcriticalThen, ifSubcriticalThen, ifSubcriticalThenElse
-
Constructor Details
-
ByKind
public ByKind()Only constructor.
-
-
Method Details
-
getOutputTags
Calculate the set of enum items which indicate the receivers the message shall be propagated to. This class returns the kind of the message, for propagating it to one single receiver.- Specified by:
getOutputTagsin classMessageDemux<Message.Kind,M extends Message> - Parameters:
m- the message to be sent.- Returns:
- all tags to which this message shall be sent.
-