Class MessageDemux.All<E extends Enum<E>,M extends Message>

Type Parameters:
E - the enumeration type controlling the routing
M - the type of the messages
All Implemented Interfaces:
MessageReceiver<M>
Enclosing class:
MessageDemux<E extends Enum<E>,M extends Message>

public static class MessageDemux.All<E extends Enum<E>,M extends Message> extends MessageDemux<E,M>
A message de-multiplexer which propagates each message to all receivers in the map.
See Also:
  • Constructor Details

    • All

      public All(Class<E> tags)
      Only constructor.
      Parameters:
      tags - the class of the controlling tag enumeration.
  • Method Details

    • getOutputTags

      protected EnumSet<E> getOutputTags(M m)
      Has to be re-defined by each subclass 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 class MessageDemux<E extends Enum<E>,M extends Message>
      Parameters:
      m - the message to be sent.
      Returns:
      all tags to which this message shall be sent.