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 ExecutorChannelInterceptor
s 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
IntegrationManagement.ManagementOverrides
Modifier and Type | Field and Description |
---|---|
protected AbstractDispatcher |
dispatcher |
protected Executor |
executor |
protected int |
executorInterceptorsSize |
protected Integer |
maxSubscribers |
interceptors, meters
EXPRESSION_PARSER, logger
INDEFINITE_TIMEOUT
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Constructor and Description |
---|
AbstractExecutorChannel(Executor executor) |
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.
|
IntegrationPatternType |
getIntegrationPatternType()
Return a pattern type this component implements.
|
boolean |
hasExecutorInterceptors() |
boolean |
removeInterceptor(ChannelInterceptor interceptor) |
ChannelInterceptor |
removeInterceptor(int index) |
void |
setInterceptors(List<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, unsubscribe
destroy, getComponentType, getFullChannelName, getIChannelInterceptorList, getInterceptors, getMetricsCaptor, getOverrides, isLoggingEnabled, onInit, registerMetricsCaptor, send, send, setDatatypes, 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
getInterceptors
send, send
getManagedName, getManagedType, getThisAs, setManagedName, setManagedType
getBeanName, getComponentName
protected Executor executor
protected AbstractDispatcher dispatcher
protected Integer maxSubscribers
protected int executorInterceptorsSize
public void setMaxSubscribers(int maxSubscribers)
maxSubscribers
- The maximum number of subscribers allowed.public void setInterceptors(List<ChannelInterceptor> interceptors)
AbstractMessageChannel
setInterceptors
in interface InterceptableChannel
setInterceptors
in class AbstractMessageChannel
interceptors
- The list of interceptors.public void addInterceptor(ChannelInterceptor interceptor)
AbstractMessageChannel
addInterceptor
in interface InterceptableChannel
addInterceptor
in class AbstractMessageChannel
interceptor
- The interceptor.public void addInterceptor(int index, ChannelInterceptor interceptor)
AbstractMessageChannel
addInterceptor
in interface InterceptableChannel
addInterceptor
in class AbstractMessageChannel
index
- The index to add interceptor.interceptor
- The interceptor.public boolean removeInterceptor(ChannelInterceptor interceptor)
removeInterceptor
in interface InterceptableChannel
removeInterceptor
in class AbstractMessageChannel
@Nullable public ChannelInterceptor removeInterceptor(int index)
removeInterceptor
in interface InterceptableChannel
removeInterceptor
in class AbstractMessageChannel
public boolean hasExecutorInterceptors()
hasExecutorInterceptors
in interface ExecutorChannelInterceptorAware
public IntegrationPatternType getIntegrationPatternType()
IntegrationPattern
getIntegrationPatternType
in interface IntegrationPattern
getIntegrationPatternType
in class AbstractMessageChannel
IntegrationPatternType
this component implements.