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:
org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, ChannelRegistryAware, MessageEndpoint, MessageTarget

public class SourceEndpoint
extends AbstractEndpoint

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

Author:
Mark Fisher

Field Summary
private  long receiveTimeout
           
private  long sendTimeout
           
private  MessageSource<?> source
           
 
Fields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
logger
 
Constructor Summary
SourceEndpoint(MessageSource<?> source)
           
 
Method Summary
protected  boolean handleMessage(Message<?> message)
           
 void initialize()
           
 boolean poll()
           
 void setReceiveTimeout(long receiveTimeout)
           
 void setSendTimeout(long sendTimeout)
           
protected  boolean supports(Message<?> message)
           
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
addInterceptor, afterPropertiesSet, getChannelRegistry, getInputChannel, getInputChannelName, getInterceptors, getName, getOutputChannel, getOutputChannelName, getSchedule, getTrigger, isRunning, send, setAutoStartup, setBeanName, setChannelRegistry, setInputChannel, setInputChannelName, setInterceptors, setName, setOutputChannel, setOutputChannelName, setSchedule, setTrigger, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

source

private final MessageSource<?> source

receiveTimeout

private volatile long receiveTimeout

sendTimeout

private volatile long sendTimeout
Constructor Detail

SourceEndpoint

public SourceEndpoint(MessageSource<?> source)
Method Detail

setReceiveTimeout

public void setReceiveTimeout(long receiveTimeout)

setSendTimeout

public void setSendTimeout(long sendTimeout)

initialize

public void initialize()
Overrides:
initialize in class AbstractEndpoint

supports

protected final boolean supports(Message<?> message)
Specified by:
supports in class AbstractEndpoint

handleMessage

protected final boolean handleMessage(Message<?> message)
Specified by:
handleMessage in class AbstractEndpoint

poll

public boolean poll()