Class AbstractExecutorChannel
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.channel.AbstractMessageChannel
org.springframework.integration.channel.AbstractSubscribableChannel
org.springframework.integration.channel.AbstractExecutorChannel
- All Implemented Interfaces:
Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,ApplicationContextAware,ExecutorChannelInterceptorAware,ExpressionCapable,IntegrationPattern,NamedComponent,IntegrationManagement,SubscribableChannelManagement,TrackableComponent,MessageChannel,SubscribableChannel,InterceptableChannel
- Direct Known Subclasses:
ExecutorChannel,PartitionedChannel,PublishSubscribeChannel
public abstract class AbstractExecutorChannel
extends AbstractSubscribableChannel
implements ExecutorChannelInterceptorAware
The
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).
- Since:
- 4.2
- Author:
- Artem Bilan, Gary Russell
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.springframework.integration.channel.AbstractMessageChannel
AbstractMessageChannel.ChannelInterceptorListNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractDispatcherprotected Executorprotected intprotected IntegerFields inherited from class org.springframework.integration.channel.AbstractMessageChannel
interceptors, metersFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.messaging.MessageChannel
INDEFINITE_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInterceptor(int index, ChannelInterceptor interceptor) Add a channel interceptor to the specified index of the list.voidaddInterceptor(ChannelInterceptor interceptor) Add a channel interceptor to the end of the list.Return a pattern type this component implements.booleanremoveInterceptor(int index) booleanremoveInterceptor(ChannelInterceptor interceptor) voidsetInterceptors(List<ChannelInterceptor> interceptors) Set the list of channel interceptors.voidsetMaxSubscribers(int maxSubscribers) Specify the maximum number of subscribers supported by the channel's dispatcher.Methods inherited from class org.springframework.integration.channel.AbstractSubscribableChannel
doSend, getDispatcher, getSubscriberCount, subscribe, unsubscribeMethods inherited from class org.springframework.integration.channel.AbstractMessageChannel
destroy, getComponentType, getFullChannelName, getIChannelInterceptorList, getInterceptors, getMetricsCaptor, getOverrides, isLoggingEnabled, isObserved, onInit, registerMetricsCaptor, registerObservationRegistry, send, send, setDatatypes, setLoggingEnabled, setMessageConverter, setObservationConvention, setShouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getManagedName, getManagedType, getThisAs, setManagedName, setManagedTypeMethods inherited from interface org.springframework.messaging.support.InterceptableChannel
getInterceptorsMethods inherited from interface org.springframework.messaging.MessageChannel
send, sendMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Field Details
-
executor
-
dispatcher
-
maxSubscribers
-
executorInterceptorsSize
protected int executorInterceptorsSize
-
-
Constructor Details
-
AbstractExecutorChannel
-
-
Method Details
-
setMaxSubscribers
public void setMaxSubscribers(int maxSubscribers) Specify the maximum number of subscribers supported by the channel's dispatcher.- Parameters:
maxSubscribers- The maximum number of subscribers allowed.
-
setInterceptors
Description copied from class:AbstractMessageChannelSet the list of channel interceptors. This will clear any existing interceptors.- Specified by:
setInterceptorsin interfaceInterceptableChannel- Overrides:
setInterceptorsin classAbstractMessageChannel- Parameters:
interceptors- The list of interceptors.
-
addInterceptor
Description copied from class:AbstractMessageChannelAdd a channel interceptor to the end of the list.- Specified by:
addInterceptorin interfaceInterceptableChannel- Overrides:
addInterceptorin classAbstractMessageChannel- Parameters:
interceptor- The interceptor.
-
addInterceptor
Description copied from class:AbstractMessageChannelAdd a channel interceptor to the specified index of the list.- Specified by:
addInterceptorin interfaceInterceptableChannel- Overrides:
addInterceptorin classAbstractMessageChannel- Parameters:
index- The index to add interceptor.interceptor- The interceptor.
-
removeInterceptor
- Specified by:
removeInterceptorin interfaceInterceptableChannel- Overrides:
removeInterceptorin classAbstractMessageChannel
-
removeInterceptor
- Specified by:
removeInterceptorin interfaceInterceptableChannel- Overrides:
removeInterceptorin classAbstractMessageChannel
-
hasExecutorInterceptors
public boolean hasExecutorInterceptors()- Specified by:
hasExecutorInterceptorsin interfaceExecutorChannelInterceptorAware
-
getIntegrationPatternType
Description copied from interface:IntegrationPatternReturn a pattern type this component implements.- Specified by:
getIntegrationPatternTypein interfaceIntegrationPattern- Overrides:
getIntegrationPatternTypein classAbstractMessageChannel- Returns:
- the
IntegrationPatternTypethis component implements.
-