org.springframework.messaging

## Interface PollableChannel

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

`INDEFINITE_TIMEOUT`

### Method Summary

All Methods Instance Methods Abstract Methods
`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

`send, send`

### Method Detail

#### receive

    @Nullable
    Message<?> receive()

Receive a message from this channel, blocking indefinitely if necessary.

Returns:
  the next available `Message` or `null` if interrupted

#### receive

    @Nullable
    Message<?> 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`.
Returns:
  the next available `Message` or `null` if the specified timeout period elapses or the message reception is interrupted