public abstract class AbstractExecutorChannel extends AbstractSubscribableChannel implements ExecutorChannelInterceptorAware
AbstractSubscribableChannel base implementation for those inheritors
which logic may be based on the Executor.
Utilizes common operations for the AbstractDispatcher.
Implements the ExecutorChannelInterceptors logic when the message handling
is handed to the Executor.execute(Runnable).
ExecutorChannel,
PublishSubscribeChannel| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractExecutorChannel.MessageHandlingTask |
AbstractMessageChannel.ChannelInterceptorList| Modifier and Type | Field and Description |
|---|---|
protected AbstractDispatcher |
dispatcher |
protected java.util.concurrent.Executor |
executor |
protected int |
executorInterceptorsSize |
protected java.lang.Integer |
maxSubscribers |
interceptorsEXPRESSION_PARSER, logger| Constructor and Description |
|---|
AbstractExecutorChannel(java.util.concurrent.Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInterceptor(org.springframework.messaging.support.ChannelInterceptor interceptor)
Add a channel interceptor to the end of the list.
|
void |
addInterceptor(int index,
org.springframework.messaging.support.ChannelInterceptor interceptor)
Add a channel interceptor to the specified index of the list.
|
boolean |
hasExecutorInterceptors() |
boolean |
removeInterceptor(org.springframework.messaging.support.ChannelInterceptor interceptor)
Remove the provided
ChannelInterceptor from the target implementation. |
org.springframework.messaging.support.ChannelInterceptor |
removeInterceptor(int index)
Remove a
ChannelInterceptor from the target implementation for specific index. |
void |
setInterceptors(java.util.List<org.springframework.messaging.support.ChannelInterceptor> interceptors)
Set the list of channel interceptors.
|
void |
setMaxSubscribers(int maxSubscribers)
Specify the maximum number of subscribers supported by the
channel's dispatcher.
|
doSend, getDispatcher, getSubscriberCount, subscribe, unsubscribeconfigureMetrics, getChannelInterceptors, getComponentType, getErrorRate, getFullChannelName, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMinSendDuration, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onInit, reset, send, send, setCountsEnabled, setDatatypes, setLoggingEnabled, setMessageConverter, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChannelInterceptorsgetComponentNameprotected volatile java.util.concurrent.Executor executor
protected volatile AbstractDispatcher dispatcher
protected volatile java.lang.Integer maxSubscribers
protected volatile int executorInterceptorsSize
public AbstractExecutorChannel(java.util.concurrent.Executor executor)
public void setMaxSubscribers(int maxSubscribers)
maxSubscribers - The maximum number of subscribers allowed.public void setInterceptors(java.util.List<org.springframework.messaging.support.ChannelInterceptor> interceptors)
AbstractMessageChannelsetInterceptors in interface ChannelInterceptorAwaresetInterceptors in class AbstractMessageChannelinterceptors - The list of interceptors.public void addInterceptor(org.springframework.messaging.support.ChannelInterceptor interceptor)
AbstractMessageChanneladdInterceptor in interface ChannelInterceptorAwareaddInterceptor in class AbstractMessageChannelinterceptor - The interceptor.public void addInterceptor(int index,
org.springframework.messaging.support.ChannelInterceptor interceptor)
AbstractMessageChanneladdInterceptor in interface ChannelInterceptorAwareaddInterceptor in class AbstractMessageChannelindex - The index to add interceptor.interceptor - The interceptor.public boolean removeInterceptor(org.springframework.messaging.support.ChannelInterceptor interceptor)
ChannelInterceptorAwareChannelInterceptor from the target implementation.removeInterceptor in interface ChannelInterceptorAwareremoveInterceptor in class AbstractMessageChannelinterceptor - ChannelInterceptor to remove.boolean if ChannelInterceptor has been removed.public org.springframework.messaging.support.ChannelInterceptor removeInterceptor(int index)
ChannelInterceptorAwareChannelInterceptor from the target implementation for specific index.removeInterceptor in interface ChannelInterceptorAwareremoveInterceptor in class AbstractMessageChannelindex - the index for the ChannelInterceptor to remove.boolean if the ChannelInterceptor has been removed.public boolean hasExecutorInterceptors()
hasExecutorInterceptors in interface ExecutorChannelInterceptorAware