类 ChannelRegistration
- java.lang.Object
- org.springframework.messaging.simp.config.ChannelRegistration
public class ChannelRegistration extends Object
A registration class for customizing the configuration for aMessageChannel
.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 构造器 说明 ChannelRegistration()
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 protected List<ChannelInterceptor>
getInterceptors()
protected boolean
hasInterceptors()
protected boolean
hasTaskExecutor()
ChannelRegistration
interceptors(ChannelInterceptor... interceptors)
Configure the given interceptors for this message channel, adding them to the channel's current list of interceptors.ChannelRegistration
setInterceptors(ChannelInterceptor... interceptors)
已过时。as of 4.3.12, in favor ofinterceptors(ChannelInterceptor...)
TaskExecutorRegistration
taskExecutor()
Configure the thread pool backing this message channel.TaskExecutorRegistration
taskExecutor(ThreadPoolTaskExecutor taskExecutor)
Configure the thread pool backing this message channel using a custom ThreadPoolTaskExecutor.
构造器详细资料
ChannelRegistration
public ChannelRegistration()
方法详细资料
taskExecutor
public TaskExecutorRegistration taskExecutor()
Configure the thread pool backing this message channel.
taskExecutor
public TaskExecutorRegistration taskExecutor(@Nullable ThreadPoolTaskExecutor taskExecutor)
Configure the thread pool backing this message channel using a custom ThreadPoolTaskExecutor.- 参数:
taskExecutor
- the executor to use (ornull
for a default executor)
interceptors
public ChannelRegistration interceptors(ChannelInterceptor... interceptors)
Configure the given interceptors for this message channel, adding them to the channel's current list of interceptors.- 从以下版本开始:
- 4.3.12
setInterceptors
@Deprecated public ChannelRegistration setInterceptors(@Nullable ChannelInterceptor... interceptors)
已过时。as of 4.3.12, in favor ofinterceptors(ChannelInterceptor...)
Configure interceptors for the message channel.
hasTaskExecutor
protected boolean hasTaskExecutor()
hasInterceptors
protected boolean hasInterceptors()
getInterceptors
protected List<ChannelInterceptor> getInterceptors()