Class FilteredMessageDispatcher
java.lang.Object
net.engio.mbassy.subscription.AbstractSubscriptionContextAware
net.engio.mbassy.dispatch.DelegatingMessageDispatcher
net.engio.mbassy.dispatch.FilteredMessageDispatcher
- All Implemented Interfaces:
IMessageDispatcher, ISubscriptionContextAware
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatch(MessagePublication publication, Object message, Iterable listeners) Delivers the given message to the given set of listeners.private booleanpassesFilter(Object message) Methods inherited from class DelegatingMessageDispatcher
getDelegate, getInvocationMethods inherited from class AbstractSubscriptionContextAware
getContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ISubscriptionContextAware
getContext
-
Field Details
-
filter
-
-
Constructor Details
-
FilteredMessageDispatcher
-
-
Method Details
-
passesFilter
-
dispatch
Description copied from interface:IMessageDispatcherDelivers 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 dispatchmessage- The message that should be delivered to the listenerslisteners- The listeners that should receive the message
-