Class FilteredMessageDispatcher

All Implemented Interfaces:
IMessageDispatcher, ISubscriptionContextAware

public final class FilteredMessageDispatcher extends DelegatingMessageDispatcher
A dispatcher that implements message filtering based on the filter configuration of the associated message handler. It will delegate message delivery to another message dispatcher after having performed the filtering logic.
  • Field Details

  • Constructor Details

    • FilteredMessageDispatcher

      public FilteredMessageDispatcher(IMessageDispatcher dispatcher)
  • Method Details

    • passesFilter

      private boolean passesFilter(Object message)
    • 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
      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