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 Object
- implements MessageDispatcher
Base class for MessageDispatcher implementations.
The subclasses implement the actual dispatching strategy, but this base class
manages the registration of MessageHandlers. 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
|
logger
protected final org.apache.commons.logging.Log logger
AbstractDispatcher
public AbstractDispatcher()
getHandlers
protected 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)
- Add the handler to the internal Set.
- Specified by:
addHandler in interface MessageDispatcher
- Returns:
- the result of
Set.add(Object)
removeHandler
public boolean removeHandler(MessageHandler handler)
- Remove the handler from the internal handler Set.
- Specified by:
removeHandler in interface MessageDispatcher
- Returns:
- the result of
Set.remove(Object)
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2010. All Rights Reserved.