Class AbstractSubscribableChannel
java.lang.Object
org.springframework.messaging.support.AbstractMessageChannel
org.springframework.messaging.support.AbstractSubscribableChannel
- All Implemented Interfaces:
Aware
,BeanNameAware
,MessageChannel
,SubscribableChannel
,InterceptableChannel
- Direct Known Subclasses:
ExecutorSubscribableChannel
public abstract class AbstractSubscribableChannel
extends AbstractMessageChannel
implements SubscribableChannel
Abstract base class for
SubscribableChannel
implementations.- Since:
- 4.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.messaging.support.AbstractMessageChannel
AbstractMessageChannel.ChannelInterceptorChain
-
Field Summary
Fields inherited from class org.springframework.messaging.support.AbstractMessageChannel
logger
Fields inherited from interface org.springframework.messaging.MessageChannel
INDEFINITE_TIMEOUT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasSubscription
(MessageHandler handler) boolean
subscribe
(MessageHandler handler) Register a message handler.boolean
unsubscribe
(MessageHandler handler) Un-register a message handler.Methods inherited from class org.springframework.messaging.support.AbstractMessageChannel
addInterceptor, addInterceptor, getBeanName, getInterceptors, getLogger, removeInterceptor, removeInterceptor, send, send, sendInternal, setBeanName, setInterceptors, setLogger, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.messaging.MessageChannel
send, send
-
Constructor Details
-
AbstractSubscribableChannel
public AbstractSubscribableChannel()
-
-
Method Details
-
getSubscribers
-
hasSubscription
-
subscribe
Description copied from interface:SubscribableChannel
Register a message handler.- Specified by:
subscribe
in interfaceSubscribableChannel
- Returns:
true
if the handler was subscribed orfalse
if it was already subscribed.
-
unsubscribe
Description copied from interface:SubscribableChannel
Un-register a message handler.- Specified by:
unsubscribe
in interfaceSubscribableChannel
- Returns:
true
if the handler was un-registered, orfalse
if was not registered.
-