public abstract class AbstractSubscribableChannel extends AbstractMessageChannel implements SubscribableChannel
SubscribableChannel
implementations.AbstractMessageChannel.ChannelInterceptorChain
Modifier and Type | Field and Description |
---|---|
private java.util.Set<MessageHandler> |
handlers |
logger
INDEFINITE_TIMEOUT
Constructor and Description |
---|
AbstractSubscribableChannel() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<MessageHandler> |
getSubscribers() |
boolean |
hasSubscription(MessageHandler handler) |
boolean |
subscribe(MessageHandler handler)
Register a message handler.
|
boolean |
unsubscribe(MessageHandler handler)
Un-register a message handler.
|
addInterceptor, addInterceptor, getBeanName, getInterceptors, removeInterceptor, removeInterceptor, send, send, sendInternal, setBeanName, setInterceptors, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
send, send
private final java.util.Set<MessageHandler> handlers
public java.util.Set<MessageHandler> getSubscribers()
public boolean hasSubscription(MessageHandler handler)
public boolean subscribe(MessageHandler handler)
SubscribableChannel
subscribe
in interface SubscribableChannel
true
if the handler was subscribed or false
if it
was already subscribed.public boolean unsubscribe(MessageHandler handler)
SubscribableChannel
unsubscribe
in interface SubscribableChannel
true
if the handler was un-registered, or false
if was not registered.