类 ExecutorSubscribableChannel
- java.lang.Object
- org.springframework.messaging.support.AbstractMessageChannel
- org.springframework.messaging.support.AbstractSubscribableChannel
- org.springframework.messaging.support.ExecutorSubscribableChannel
public class ExecutorSubscribableChannel extends AbstractSubscribableChannel
ASubscribableChannelthat sends messages to each of its subscribers.- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Rossen Stoyanchev
嵌套类概要
从类继承的嵌套类/接口 org.springframework.messaging.support.AbstractMessageChannel
AbstractMessageChannel.ChannelInterceptorChain
字段概要
从类继承的字段 org.springframework.messaging.support.AbstractMessageChannel
logger
从接口继承的字段 org.springframework.messaging.MessageChannel
INDEFINITE_TIMEOUT
构造器概要
构造器 构造器 说明 ExecutorSubscribableChannel()Create a newExecutorSubscribableChannelinstance where messages will be sent in the callers thread.ExecutorSubscribableChannel(Executor executor)Create a newExecutorSubscribableChannelinstance where messages will be sent via the specified executor.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddInterceptor(ChannelInterceptor interceptor)Add a channel interceptor to the end of the list.ExecutorgetExecutor()booleansendInternal(Message<?> message, long timeout)voidsetInterceptors(List<ChannelInterceptor> interceptors)Set the list of channel interceptors clearing any existing interceptors.从类继承的方法 org.springframework.messaging.support.AbstractSubscribableChannel
getSubscribers, hasSubscription, subscribe, unsubscribe
从类继承的方法 org.springframework.messaging.support.AbstractMessageChannel
addInterceptor, getBeanName, getInterceptors, removeInterceptor, removeInterceptor, send, send, setBeanName, toString
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 org.springframework.messaging.MessageChannel
send, send
构造器详细资料
ExecutorSubscribableChannel
public ExecutorSubscribableChannel()
Create a newExecutorSubscribableChannelinstance where messages will be sent in the callers thread.
ExecutorSubscribableChannel
public ExecutorSubscribableChannel(Executor executor)
Create a newExecutorSubscribableChannelinstance where messages will be sent via the specified executor.- 参数:
executor- the executor used to send the message, ornullto execute in the callers thread.
方法详细资料
getExecutor
public Executor getExecutor()
setInterceptors
public void setInterceptors(List<ChannelInterceptor> interceptors)
从接口复制的说明:InterceptableChannelSet the list of channel interceptors clearing any existing interceptors.- 指定者:
setInterceptors在接口中InterceptableChannel- 覆盖:
setInterceptors在类中AbstractMessageChannel
addInterceptor
public void addInterceptor(ChannelInterceptor interceptor)
从接口复制的说明:InterceptableChannelAdd a channel interceptor to the end of the list.- 指定者:
addInterceptor在接口中InterceptableChannel- 覆盖:
addInterceptor在类中AbstractMessageChannel
sendInternal
public boolean sendInternal(Message<?> message, long timeout)
- 指定者:
sendInternal在类中AbstractMessageChannel