Class AbstractSubscribableChannel
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.channel.AbstractMessageChannel
org.springframework.integration.channel.AbstractSubscribableChannel
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- ApplicationContextAware,- ComponentSourceAware,- ExpressionCapable,- IntegrationPattern,- NamedComponent,- IntegrationManagement,- SubscribableChannelManagement,- TrackableComponent,- MessageChannel,- SubscribableChannel,- InterceptableChannel
- Direct Known Subclasses:
- AbstractExecutorChannel,- DirectChannel,- PostgresSubscribableChannel
public abstract class AbstractSubscribableChannel
extends AbstractMessageChannel
implements SubscribableChannel, SubscribableChannelManagement
Base implementation of 
MessageChannel that
 invokes the subscribed handler(s) by delegating to a
 MessageDispatcher.- Author:
- Mark Fisher, Oleg Zhurakousky, Gary Russell, Artme Bilan
- 
Nested Class SummaryNested classes/interfaces inherited from class org.springframework.integration.channel.AbstractMessageChannelAbstractMessageChannel.ChannelInterceptorListNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.channel.AbstractMessageChannelinterceptors, metersFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.messaging.MessageChannelINDEFINITE_TIMEOUT
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanSubclasses must implement this method.protected abstract MessageDispatcherintThe number of message handlers currently subscribed to this channel.booleansubscribe(MessageHandler handler) booleanunsubscribe(MessageHandler handle) Methods inherited from class org.springframework.integration.channel.AbstractMessageChanneladdInterceptor, addInterceptor, destroy, getComponentType, getFullChannelName, getIChannelInterceptorList, getIntegrationPatternType, getInterceptors, getMetricsCaptor, getOverrides, isApplicationRunning, isLoggingEnabled, isObserved, onInit, registerMetricsCaptor, registerObservationRegistry, removeInterceptor, removeInterceptor, send, send, setDatatypes, setInterceptors, setLoggingEnabled, setMessageConverter, setObservationConvention, setShouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetManagedName, getManagedType, getThisAs, setManagedName, setManagedTypeMethods inherited from interface org.springframework.messaging.MessageChannelsend, sendMethods inherited from interface org.springframework.integration.support.context.NamedComponentgetBeanName, getComponentName
- 
Constructor Details- 
AbstractSubscribableChannelpublic AbstractSubscribableChannel()
 
- 
- 
Method Details- 
getSubscriberCountpublic int getSubscriberCount()Description copied from interface:SubscribableChannelManagementThe number of message handlers currently subscribed to this channel.- Specified by:
- getSubscriberCountin interface- SubscribableChannelManagement
- Returns:
- the number of subscribers.
 
- 
subscribe- Specified by:
- subscribein interface- SubscribableChannel
 
- 
unsubscribe- Specified by:
- unsubscribein interface- SubscribableChannel
 
- 
doSendDescription copied from class:AbstractMessageChannelSubclasses must implement this method. A non-negative timeout indicates how long to wait if the channel is at capacity (if the value is 0, it must return immediately with or without success). A negative timeout value indicates that the method should block until either the message is accepted or the blocking thread is interrupted.- Specified by:
- doSendin class- AbstractMessageChannel
- Parameters:
- message- The message.
- timeout- The timeout.
- Returns:
- true if the sendwas successful.
 
- 
getDispatcher
 
-