Package net.engio.mbassy.dispatch
Class DelegatingMessageDispatcher
- java.lang.Object
-
- net.engio.mbassy.subscription.AbstractSubscriptionContextAware
-
- net.engio.mbassy.dispatch.DelegatingMessageDispatcher
-
- All Implemented Interfaces:
IMessageDispatcher
,ISubscriptionContextAware
- Direct Known Subclasses:
EnvelopedMessageDispatcher
,FilteredMessageDispatcher
public abstract class DelegatingMessageDispatcher extends AbstractSubscriptionContextAware implements IMessageDispatcher
A delegating dispatcher wraps additional logic around a given delegate. Essentially its an implementation of the decorator pattern.
-
-
Field Summary
Fields Modifier and Type Field Description private IMessageDispatcher
delegate
-
Constructor Summary
Constructors Constructor Description DelegatingMessageDispatcher(IMessageDispatcher delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IMessageDispatcher
getDelegate()
IHandlerInvocation
getInvocation()
Get the handler invocation that will be used to deliver the message to each listener.-
Methods inherited from class net.engio.mbassy.subscription.AbstractSubscriptionContextAware
getContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.engio.mbassy.dispatch.IMessageDispatcher
dispatch
-
Methods inherited from interface net.engio.mbassy.subscription.ISubscriptionContextAware
getContext
-
-
-
-
Field Detail
-
delegate
private final IMessageDispatcher delegate
-
-
Constructor Detail
-
DelegatingMessageDispatcher
public DelegatingMessageDispatcher(IMessageDispatcher delegate)
-
-
Method Detail
-
getDelegate
protected IMessageDispatcher getDelegate()
-
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 interfaceIMessageDispatcher
- Returns:
- the handler invocation that will be used to deliver the message to each listener
-
-