Class MessageDispatcher

All Implemented Interfaces:
IMessageDispatcher, ISubscriptionContextAware

public class MessageDispatcher extends AbstractSubscriptionContextAware implements IMessageDispatcher
Standard implementation for direct, unfiltered message delivery.

For each message delivery, this dispatcher iterates over the listeners and uses the previously provided handler invocation to deliver the message to each listener

  • Field Details

  • Constructor Details

  • Method Details

    • dispatch

      public void dispatch(MessagePublication publication, Object message, Iterable listeners)
      Description copied from interface: IMessageDispatcher
      Delivers the given message to the given set of listeners. Delivery may be delayed, aborted or restricted in various ways, depending on the configuration of the dispatcher
      Specified by:
      dispatch in interface IMessageDispatcher
      Parameters:
      publication - The message publication that initiated the dispatch
      message - The message that should be delivered to the listeners
      listeners - The listeners that should receive the message
    • getInvocation

      public IHandlerInvocation getInvocation()
      Description copied from interface: IMessageDispatcher
      Get the handler invocation that will be used to deliver the message to each listener.
      Specified by:
      getInvocation in interface IMessageDispatcher
      Returns:
      the handler invocation that will be used to deliver the message to each listener