Spring Integration

org.springframework.integration.core
Interface PollableChannel

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

public interface PollableChannel
extends MessageChannel

Interface for Message Channels from which Messages may be actively received through polling.

Author:
Mark Fisher

Method Summary
 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.MessageChannel
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

Spring Integration

Copyright © 2010. All Rights Reserved.