|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.dispatcher.AbstractDispatcher
public abstract class AbstractDispatcher
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 OrderedAwareCopyOnWriteArraySet for more detail.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
|---|---|
AbstractDispatcher()
|
|
| Method Summary | |
|---|---|
boolean |
addHandler(MessageHandler handler)
Add the handler to the internal Set. |
int |
getHandlerCount()
|
protected java.util.Set<MessageHandler> |
getHandlers()
Returns an unmodifiable Set of this dispatcher's handlers. |
boolean |
removeHandler(MessageHandler handler)
Remove the handler from the internal handler Set. |
void |
setMaxSubscribers(int maxSubscribers)
Set the maximum subscribers allowed by this dispatcher. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.springframework.integration.dispatcher.MessageDispatcher |
|---|
dispatch |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log logger
| Constructor Detail |
|---|
public AbstractDispatcher()
| Method Detail |
|---|
public void setMaxSubscribers(int maxSubscribers)
maxSubscribers - protected java.util.Set<MessageHandler> getHandlers()
Set of this dispatcher's handlers. This
is provided for access by subclasses.
public boolean addHandler(MessageHandler handler)
addHandler in interface MessageDispatcherSet.add(Object)public boolean removeHandler(MessageHandler handler)
removeHandler in interface MessageDispatcherSet.remove(Object)public java.lang.String toString()
toString in class java.lang.Objectpublic int getHandlerCount()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||