org.springframework.integration.adapter
Class PollingSourceAdapter<T>

java.lang.Object
  extended by org.springframework.integration.adapter.AbstractSourceAdapter<T>
      extended by org.springframework.integration.adapter.PollingSourceAdapter<T>
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, SourceAdapter, MessagingTaskSchedulerAware
Direct Known Subclasses:
ByteStreamSourceAdapter, CharacterStreamSourceAdapter, FileSourceAdapter, JmsPollingSourceAdapter

public class PollingSourceAdapter<T>
extends AbstractSourceAdapter<T>
implements MessagingTaskSchedulerAware, org.springframework.context.Lifecycle

A channel adapter that retrieves objects from a PollableSource, delegates to a MessageMapper to create messages from those objects, and then sends the resulting messages to the provided MessageChannel.

Author:
Mark Fisher

Field Summary
 
Fields inherited from class org.springframework.integration.adapter.AbstractSourceAdapter
logger
 
Constructor Summary
PollingSourceAdapter(PollableSource<T> source)
           
 
Method Summary
protected  PollableSource<T> getSource()
           
 boolean isRunning()
           
 int processMessages()
           
 void setInitialDelay(long intialDelay)
           
 void setMaxMessagesPerTask(int maxMessagesPerTask)
           
 void setMessagingTaskScheduler(MessagingTaskScheduler scheduler)
           
 void setPeriod(long period)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.springframework.integration.adapter.AbstractSourceAdapter
afterPropertiesSet, getChannel, getMessageMapper, initialize, isInitialized, sendToChannel, setChannel, setMessageMapper, setSendTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PollingSourceAdapter

public PollingSourceAdapter(PollableSource<T> source)
Method Detail

setInitialDelay

public void setInitialDelay(long intialDelay)

setPeriod

public void setPeriod(long period)

setMaxMessagesPerTask

public void setMaxMessagesPerTask(int maxMessagesPerTask)

setMessagingTaskScheduler

public void setMessagingTaskScheduler(MessagingTaskScheduler scheduler)
Specified by:
setMessagingTaskScheduler in interface MessagingTaskSchedulerAware

getSource

protected PollableSource<T> getSource()

isRunning

public boolean isRunning()
Specified by:
isRunning in interface org.springframework.context.Lifecycle

start

public void start()
Specified by:
start in interface org.springframework.context.Lifecycle

stop

public void stop()
Specified by:
stop in interface org.springframework.context.Lifecycle

processMessages

public int processMessages()