类 ExecutorSubscribableChannel
- java.lang.Object
- org.springframework.messaging.support.AbstractMessageChannel
- org.springframework.messaging.support.AbstractSubscribableChannel
- org.springframework.messaging.support.ExecutorSubscribableChannel
public class ExecutorSubscribableChannel extends AbstractSubscribableChannel
ASubscribableChannel
that 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 newExecutorSubscribableChannel
instance where messages will be sent in the callers thread.ExecutorSubscribableChannel(Executor executor)
Create a newExecutorSubscribableChannel
instance where messages will be sent via the specified executor.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
addInterceptor(int index, ChannelInterceptor interceptor)
Add a channel interceptor at the specified index.void
addInterceptor(ChannelInterceptor interceptor)
Add a channel interceptor to the end of the list.Executor
getExecutor()
boolean
sendInternal(Message<?> message, long timeout)
void
setInterceptors(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
getBeanName, getInterceptors, getLogger, removeInterceptor, removeInterceptor, send, send, setBeanName, setLogger, 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 newExecutorSubscribableChannel
instance where messages will be sent in the callers thread.
ExecutorSubscribableChannel
public ExecutorSubscribableChannel(@Nullable Executor executor)
Create a newExecutorSubscribableChannel
instance where messages will be sent via the specified executor.- 参数:
executor
- the executor used to send the message, ornull
to execute in the callers thread.
方法详细资料
getExecutor
@Nullable public Executor getExecutor()
setInterceptors
public void setInterceptors(List<ChannelInterceptor> interceptors)
从接口复制的说明:InterceptableChannel
Set the list of channel interceptors clearing any existing interceptors.- 指定者:
setInterceptors
在接口中InterceptableChannel
- 覆盖:
setInterceptors
在类中AbstractMessageChannel
addInterceptor
public void addInterceptor(ChannelInterceptor interceptor)
从接口复制的说明:InterceptableChannel
Add a channel interceptor to the end of the list.- 指定者:
addInterceptor
在接口中InterceptableChannel
- 覆盖:
addInterceptor
在类中AbstractMessageChannel
addInterceptor
public void addInterceptor(int index, ChannelInterceptor interceptor)
从接口复制的说明:InterceptableChannel
Add a channel interceptor at the specified index.- 指定者:
addInterceptor
在接口中InterceptableChannel
- 覆盖:
addInterceptor
在类中AbstractMessageChannel
sendInternal
public boolean sendInternal(Message<?> message, long timeout)
- 指定者:
sendInternal
在类中AbstractMessageChannel