org.springframework.integration.channel
Interface PollableChannel

All Superinterfaces:
MessageChannel
All Known Implementing Classes:
AbstractPollableChannel, NullChannel, PriorityChannel, QueueChannel, RendezvousChannel, ThreadLocalChannel

public interface PollableChannel
extends MessageChannel

Author:
Mark Fisher

Method Summary
 java.util.List<Message<?>> clear()
          Remove all Messages from this channel.
 java.util.List<Message<?>> purge(MessageSelector selector)
          Remove any Messages that are not accepted by the provided selector.
 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.integration.core.MessageChannel
getName, send, send
 

Method Detail

receive

Message<?> receive()
Receive a message from this channel, blocking indefinitely if necessary.

Returns:
the next available Message or null 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.

Parameters:
timeout - the timeout in milliseconds
Returns:
the next available Message or null if the specified timeout period elapses or the message reception is interrupted

clear

java.util.List<Message<?>> clear()
Remove all Messages from this channel.


purge

java.util.List<Message<?>> purge(MessageSelector selector)
Remove any Messages that are not accepted by the provided selector.