org.springframework.integration.dispatcher
Class ChannelPollingMessageRetriever

java.lang.Object
  extended by org.springframework.integration.dispatcher.ChannelPollingMessageRetriever
All Implemented Interfaces:
MessageRetriever

public class ChannelPollingMessageRetriever
extends java.lang.Object
implements MessageRetriever

Message retriever that polls a MessageChannel. The number of messages retrieved per poll is limited by the 'maxMessagesPerTask' property of the channel's dispatcher policy, and the timeout for each receive call is determined by the dispatcher policy's 'receiveTimeout' property. In general, it is recommended to use a value of 1 for 'maxMessagesPerTask' whenever a significant timeout is provided. Otherwise the retriever may be holding on to available messages while waiting for additional messages.

Author:
Mark Fisher

Constructor Summary
ChannelPollingMessageRetriever(MessageChannel channel)
           
 
Method Summary
 java.util.Collection<Message<?>> retrieveMessages()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelPollingMessageRetriever

public ChannelPollingMessageRetriever(MessageChannel channel)
Method Detail

retrieveMessages

public java.util.Collection<Message<?>> retrieveMessages()
Specified by:
retrieveMessages in interface MessageRetriever