PollableChannel (Spring Framework 5.0.0.RELEASE API) (original) (raw)
- All Superinterfaces:
MessageChannel
public interface PollableChannel
extends MessageChannel
A MessageChannel from which messages may be actively received through polling.
Since:
4.0
Author:
Mark Fisher
Field Summary
* ### Fields inherited from interface org.springframework.messaging.[MessageChannel](../../../org/springframework/messaging/MessageChannel.html "interface in org.springframework.messaging") `[INDEFINITE_TIMEOUT](../../../org/springframework/messaging/MessageChannel.html#INDEFINITE%5FTIMEOUT)`
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type Method and Description 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. * ### Methods inherited from interface org.springframework.messaging.[MessageChannel](../../../org/springframework/messaging/MessageChannel.html "interface in org.springframework.messaging") `[send](../../../org/springframework/messaging/MessageChannel.html#send-org.springframework.messaging.Message-), [send](../../../org/springframework/messaging/MessageChannel.html#send-org.springframework.messaging.Message-long-)`
Method Detail
* #### receive [@Nullable](../../../org/springframework/lang/Nullable.html "annotation in org.springframework.lang") [Message](../../../org/springframework/messaging/Message.html "interface in org.springframework.messaging")<?> receive() Receive a message from this channel, blocking indefinitely if necessary. Returns: the next available [Message](../../../org/springframework/messaging/Message.html "interface in org.springframework.messaging") or `null` if interrupted * #### receive [@Nullable](../../../org/springframework/lang/Nullable.html "annotation in org.springframework.lang") [Message](../../../org/springframework/messaging/Message.html "interface in org.springframework.messaging")<?> receive(long timeout) Receive a message from this channel, blocking until either a message is available or the specified timeout period elapses. Parameters: `timeout` \- the timeout in milliseconds or [MessageChannel.INDEFINITE\_TIMEOUT](../../../org/springframework/messaging/MessageChannel.html#INDEFINITE%5FTIMEOUT). Returns: the next available [Message](../../../org/springframework/messaging/Message.html "interface in org.springframework.messaging") or `null` if the specified timeout period elapses or the message reception is interrupted