接口 PollableChannel
- 所有超级接口:
MessageChannel
public interface PollableChannel extends MessageChannel
AMessageChannel
from which messages may be actively received through polling.- 从以下版本开始:
- 4.0
- 作者:
- Mark Fisher
字段概要
从接口继承的字段 org.springframework.messaging.MessageChannel
INDEFINITE_TIMEOUT
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Message<?>
receive()
Receive a message from this channel, blocking indefinitely if necessary.Message<?>
receive(long timeout)
Receive a message from this channel, blocking until either a message is available or the specified timeout period elapses.从接口继承的方法 org.springframework.messaging.MessageChannel
send, send
方法详细资料
receive
Message<?> receive()
Receive a message from this channel, blocking indefinitely if necessary.- 返回:
- the next available
Message
ornull
if interrupted
receive
Message<?> receive(long timeout)
Receive a message from this channel, blocking until either a message is available or the specified timeout period elapses.- 参数:
timeout
- the timeout in milliseconds orMessageChannel.INDEFINITE_TIMEOUT
.- 返回:
- the next available
Message
ornull
if the specified timeout period elapses or the message reception is interrupted