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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionConfigure the givenExecutor
for this message channel, taking precedence over a task executor registration if any.protected Executor
getExecutor
(Supplier<Executor> fallback, Consumer<Executor> customizer) Return theExecutor
to use.protected List<ChannelInterceptor>
protected boolean
protected boolean
interceptors
(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
-
ChannelRegistration
public ChannelRegistration()
-
-
Method Details
-
taskExecutor
Configure the thread pool backing this message channel. -
taskExecutor
Configure the thread pool backing this message channel using a custom ThreadPoolTaskExecutor.- Parameters:
taskExecutor
- the executor to use (ornull
for a default executor)
-
executor
Configure the givenExecutor
for this message channel, taking precedence over a task executor registration if any.- Parameters:
executor
- the executor to use- Since:
- 6.2
-
interceptors
Configure the given interceptors for this message channel, adding them to the channel's current list of interceptors.- Since:
- 4.3.12
-
hasExecutor
protected boolean hasExecutor() -
hasInterceptors
protected boolean hasInterceptors() -
getExecutor
Return theExecutor
to use. If no executor has been configured, thefallback
supplier is used to provide a fallback instance.If the
Executor
to use is suitable for further customizations, thecustomizer
consumer is invoked.- Parameters:
fallback
- a supplier of a fallback executor in case none is configuredcustomizer
- further customizations- Returns:
- the executor to use
- Since:
- 6.2
-
getInterceptors
-