org.springframework.integration.endpoint
Class SourceEndpoint

java.lang.Object
  extended by org.springframework.integration.endpoint.AbstractEndpoint
      extended by org.springframework.integration.endpoint.SourceEndpoint
All Implemented Interfaces:
java.lang.Runnable, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, MessageEndpoint, MessagingTask

public class SourceEndpoint
extends AbstractEndpoint
implements MessagingTask, org.springframework.beans.factory.InitializingBean

A channel adapter that retrieves messages from a Source and then sends the resulting messages to the provided MessageChannel.

Author:
Mark Fisher

Nested Class Summary
private static class SourceEndpoint.MethodNameAdvisor
           
 
Field Summary
private  java.util.List<org.aopalliance.aop.Advice> dispatchAdviceChain
           
private  PollingDispatcher dispatcher
           
private  DispatcherPolicy dispatcherPolicy
           
private  Schedule schedule
           
private  MessagingTask task
           
private  java.util.List<org.aopalliance.aop.Advice> taskAdviceChain
           
private  boolean taskInitialized
           
private  java.lang.Object taskMonitor
           
 
Fields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
logger
 
Constructor Summary
SourceEndpoint(Source<?> source, MessageChannel channel, Schedule schedule)
           
 
Method Summary
 void afterPropertiesSet()
           
 Schedule getSchedule()
           
private  MessagingTask getTask()
           
 void initializeTask()
           
 void refreshTask()
           
 void run()
           
 void setDispatchAdviceChain(java.util.List<org.aopalliance.aop.Advice> dispatchAdviceChain)
           
 void setMaxMessagesPerTask(int maxMessagesPerTask)
           
 void setSendTimeout(long sendTimeout)
           
 void setTaskAdviceChain(java.util.List<org.aopalliance.aop.Advice> taskAdviceChain)
           
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
getName, setBeanName, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

schedule

private final Schedule schedule

dispatcherPolicy

private final DispatcherPolicy dispatcherPolicy

dispatcher

private volatile PollingDispatcher dispatcher

dispatchAdviceChain

private volatile java.util.List<org.aopalliance.aop.Advice> dispatchAdviceChain

task

private volatile MessagingTask task

taskAdviceChain

private volatile java.util.List<org.aopalliance.aop.Advice> taskAdviceChain

taskInitialized

private volatile boolean taskInitialized

taskMonitor

private final java.lang.Object taskMonitor
Constructor Detail

SourceEndpoint

public SourceEndpoint(Source<?> source,
                      MessageChannel channel,
                      Schedule schedule)
Method Detail

setMaxMessagesPerTask

public void setMaxMessagesPerTask(int maxMessagesPerTask)

setSendTimeout

public void setSendTimeout(long sendTimeout)

setTaskAdviceChain

public void setTaskAdviceChain(java.util.List<org.aopalliance.aop.Advice> taskAdviceChain)

setDispatchAdviceChain

public void setDispatchAdviceChain(java.util.List<org.aopalliance.aop.Advice> dispatchAdviceChain)

getSchedule

public Schedule getSchedule()
Specified by:
getSchedule in interface MessagingTask

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

initializeTask

public void initializeTask()

refreshTask

public void refreshTask()

getTask

private MessagingTask getTask()

run

public void run()
Specified by:
run in interface java.lang.Runnable