Class ChannelRegistration
java.lang.Object
org.springframework.messaging.simp.config.ChannelRegistration
A registration class for customizing the configuration for a
 
MessageChannel.- Since:
- 4.0
- Author:
- Rossen Stoyanchev, Stephane Nicoll
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionConfigure the givenExecutorfor this message channel, taking precedence over a task executor registration if any.protected ExecutorgetExecutor(Supplier<Executor> fallback, Consumer<Executor> customizer) Return theExecutorto use.protected List<ChannelInterceptor>protected booleanprotected booleaninterceptors(ChannelInterceptor... interceptors) Configure the given interceptors for this message channel, adding them to the channel's current list of interceptors.Configure the thread pool backing this message channel.taskExecutor(ThreadPoolTaskExecutor taskExecutor) Configure the thread pool backing this message channel using a custom ThreadPoolTaskExecutor.
- 
Constructor Details- 
ChannelRegistrationpublic ChannelRegistration()
 
- 
- 
Method Details- 
taskExecutorConfigure the thread pool backing this message channel.
- 
taskExecutorConfigure the thread pool backing this message channel using a custom ThreadPoolTaskExecutor.- Parameters:
- taskExecutor- the executor to use (or- nullfor a default executor)
 
- 
executorConfigure the givenExecutorfor this message channel, taking precedence over a task executor registration if any.- Parameters:
- executor- the executor to use
- Since:
- 6.2
 
- 
interceptorsConfigure the given interceptors for this message channel, adding them to the channel's current list of interceptors.- Since:
- 4.3.12
 
- 
hasExecutorprotected boolean hasExecutor()
- 
hasInterceptorsprotected boolean hasInterceptors()
- 
getExecutorReturn theExecutorto use. If no executor has been configured, thefallbacksupplier is used to provide a fallback instance.If the Executorto use is suitable for further customizations, thecustomizerconsumer is invoked.- Parameters:
- fallback- a supplier of a fallback executor in case none is configured
- customizer- further customizations
- Returns:
- the executor to use
- Since:
- 6.2
 
- 
getInterceptors
 
-