public abstract class AbstractSubscribableChannel extends AbstractMessageChannel implements org.springframework.messaging.SubscribableChannel, SubscribableChannelManagement
MessageChannel
that invokes the subscribed
handler(s)
by delegating to a MessageDispatcher
.AbstractMessageChannel.ChannelInterceptorList
IntegrationManagement.ManagementOverrides
interceptors
EXPRESSION_PARSER, logger
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Constructor and Description |
---|
AbstractSubscribableChannel() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doSend(org.springframework.messaging.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(org.springframework.messaging.MessageHandler handler) |
boolean |
unsubscribe(org.springframework.messaging.MessageHandler handle) |
addInterceptor, addInterceptor, configureMetrics, getChannelInterceptors, getComponentType, getErrorRate, getFullChannelName, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMetricsCaptor, getMinSendDuration, getOverrides, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onInit, registerMetricsCaptor, removeInterceptor, removeInterceptor, reset, send, send, setCountsEnabled, setDatatypes, setInterceptors, setLoggingEnabled, setMessageConverter, setShouldTrack, setStatsEnabled
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, 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
getComponentName
public int getSubscriberCount()
SubscribableChannelManagement
getSubscriberCount
in interface SubscribableChannelManagement
public boolean subscribe(org.springframework.messaging.MessageHandler handler)
subscribe
in interface org.springframework.messaging.SubscribableChannel
public boolean unsubscribe(org.springframework.messaging.MessageHandler handle)
unsubscribe
in interface org.springframework.messaging.SubscribableChannel
protected boolean doSend(org.springframework.messaging.Message<?> message, long timeout)
AbstractMessageChannel
doSend
in class AbstractMessageChannel
message
- The message.timeout
- The timeout.protected abstract MessageDispatcher getDispatcher()