org.springframework.integration.dispatcher
Class AbstractDispatcher
java.lang.Object
org.springframework.integration.dispatcher.AbstractDispatcher
- All Implemented Interfaces:
- MessageDispatcher
- Direct Known Subclasses:
- BroadcastingDispatcher, UnicastingDispatcher
public abstract class AbstractDispatcher
- extends java.lang.Object
- implements MessageDispatcher
Base class for MessageDispatcher
implementations.
The subclasses implement the actual dispatching strategy, but this base
class manages the registration of MessageHandler
s. Although the
implemented dispatching strategies may invoke handles in different ways
(e.g. round-robin vs. failover), this class does maintain the order of the
underlying collection. See the OrderedAwareLinkedHashSet
for more
detail.
- Author:
- Mark Fisher, Iwein Fuld, Oleg Zhurakousky
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
AbstractDispatcher
public AbstractDispatcher()
getHandlers
protected java.util.List<MessageHandler> getHandlers()
- Returns a copied, unmodifiable List of this dispatcher's handlers.
This is provided for access by subclasses.
addHandler
public boolean addHandler(MessageHandler handler)
- Specified by:
addHandler
in interface MessageDispatcher
removeHandler
public boolean removeHandler(MessageHandler handler)
- Specified by:
removeHandler
in interface MessageDispatcher
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object