public abstract class AbstractPollableChannel extends AbstractMessageChannel implements PollableChannel, PollableChannelManagement, ExecutorChannelInterceptorAware
AbstractMessageChannel.ChannelInterceptorListIntegrationManagement.ManagementOverridesinterceptors, metersEXPRESSION_PARSER, loggerINDEFINITE_TIMEOUTMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
AbstractPollableChannel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInterceptor(ChannelInterceptor interceptor)
Add a channel interceptor to the end of the list.
|
void |
addInterceptor(int index,
ChannelInterceptor interceptor)
Add a channel interceptor to the specified index of the list.
|
protected abstract Message<?> |
doReceive(long timeout)
Subclasses must implement this method.
|
IntegrationPatternType |
getIntegrationPatternType()
Return a pattern type this component implements.
|
int |
getReceiveCount()
Deprecated.
in favor of Micrometer metrics.
|
long |
getReceiveCountLong()
Deprecated.
in favor of Micrometer metrics.
|
int |
getReceiveErrorCount()
Deprecated.
in favor of Micrometer metrics.
|
long |
getReceiveErrorCountLong()
Deprecated.
in favor of Micrometer metrics.
|
boolean |
hasExecutorInterceptors() |
Message<?> |
receive()
Receive the first available message from this channel.
|
Message<?> |
receive(long timeout)
Receive the first available message from this channel.
|
boolean |
removeInterceptor(ChannelInterceptor interceptor) |
ChannelInterceptor |
removeInterceptor(int index) |
void |
setInterceptors(List<ChannelInterceptor> interceptors)
Set the list of channel interceptors.
|
configureMetrics, destroy, doSend, getComponentType, getErrorRate, getFullChannelName, getIChannelInterceptorList, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMetricsCaptor, getMinSendDuration, getOverrides, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onInit, registerMetricsCaptor, reset, send, send, setCountsEnabled, setDatatypes, setLoggingEnabled, setMessageConverter, setShouldTrack, setStatsEnabledafterPropertiesSet, 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsend, sendreceiveCount, receiveErrorCountisStatsEnabled, setStatsEnableddestroy, getOverrides, isCountsEnabled, isLoggingEnabled, registerMetricsCaptor, reset, setCountsEnabled, setLoggingEnabledgetInterceptorsgetBeanName, getComponentNamesendCount, sendErrorCount@Deprecated public int getReceiveCount()
getReceiveCount in interface PollableChannelManagement@Deprecated public long getReceiveCountLong()
getReceiveCountLong in interface PollableChannelManagement@Deprecated public int getReceiveErrorCount()
getReceiveErrorCount in interface PollableChannelManagement@Deprecated public long getReceiveErrorCountLong()
getReceiveErrorCountLong in interface PollableChannelManagementpublic IntegrationPatternType getIntegrationPatternType()
IntegrationPatterngetIntegrationPatternType in interface IntegrationPatterngetIntegrationPatternType in class AbstractMessageChannelIntegrationPatternType this component implements.@Nullable public Message<?> receive()
receive in interface PollableChannelnull if the
receiving thread is interrupted.@Nullable public Message<?> receive(long timeout)
receive()).receive in interface PollableChanneltimeout - the timeout in millisecondsnull if no message
is available within the allotted time or the receiving thread is
interrupted.public void setInterceptors(List<ChannelInterceptor> interceptors)
AbstractMessageChannelsetInterceptors in interface InterceptableChannelsetInterceptors in class AbstractMessageChannelinterceptors - The list of interceptors.public void addInterceptor(ChannelInterceptor interceptor)
AbstractMessageChanneladdInterceptor in interface InterceptableChanneladdInterceptor in class AbstractMessageChannelinterceptor - The interceptor.public void addInterceptor(int index,
ChannelInterceptor interceptor)
AbstractMessageChanneladdInterceptor in interface InterceptableChanneladdInterceptor in class AbstractMessageChannelindex - The index to add interceptor.interceptor - The interceptor.public boolean removeInterceptor(ChannelInterceptor interceptor)
removeInterceptor in interface InterceptableChannelremoveInterceptor in class AbstractMessageChannel@Nullable public ChannelInterceptor removeInterceptor(int index)
removeInterceptor in interface InterceptableChannelremoveInterceptor in class AbstractMessageChannelpublic boolean hasExecutorInterceptors()
hasExecutorInterceptors in interface ExecutorChannelInterceptorAware@Nullable protected abstract Message<?> doReceive(long timeout)
timeout - The timeout.