public abstract class AbstractSubscribableChannel extends AbstractMessageChannel implements SubscribableChannel, SubscribableChannelManagement
MessageChannel
that
invokes the subscribed handler(s)
by delegating to a
MessageDispatcher
.AbstractMessageChannel.ChannelInterceptorList
IntegrationManagement.ManagementOverrides
interceptors, meters
EXPRESSION_PARSER, logger
INDEFINITE_TIMEOUT
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Constructor and Description |
---|
AbstractSubscribableChannel() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doSend(Message<?> message,
long timeout)
Subclasses must implement this method.
|
protected abstract MessageDispatcher |
getDispatcher() |
int |
getSubscriberCount()
The number of message handlers currently subscribed to this channel.
|
boolean |
subscribe(MessageHandler handler) |
boolean |
unsubscribe(MessageHandler handle) |
addInterceptor, addInterceptor, destroy, getComponentType, getFullChannelName, getIChannelInterceptorList, getIntegrationPatternType, getInterceptors, getMetricsCaptor, getOverrides, isLoggingEnabled, onInit, registerMetricsCaptor, removeInterceptor, removeInterceptor, send, send, setDatatypes, setInterceptors, setLoggingEnabled, setMessageConverter, setShouldTrack
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
send, send
getManagedName, getManagedType, getThisAs, setManagedName, setManagedType
getBeanName, getComponentName
public int getSubscriberCount()
SubscribableChannelManagement
getSubscriberCount
in interface SubscribableChannelManagement
public boolean subscribe(MessageHandler handler)
subscribe
in interface SubscribableChannel
public boolean unsubscribe(MessageHandler handle)
unsubscribe
in interface SubscribableChannel
protected boolean doSend(Message<?> message, long timeout)
AbstractMessageChannel
doSend
in class AbstractMessageChannel
message
- The message.timeout
- The timeout.protected abstract MessageDispatcher getDispatcher()