org.springframework.integration.endpoint
Class MessageProducerSupport

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.endpoint.MessageProducerSupport
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, Lifecycle, Phased, SmartLifecycle, NamedComponent, MessageProducer, TrackableComponent
Direct Known Subclasses:
AbstractInboundFileSynchronizingMessageSource, AbstractInternetProtocolReceivingChannelAdapter, AbstractXmppConnectionAwareEndpoint, ApplicationEventListeningMessageProducer, ImapIdleChannelAdapter, NotificationListeningMessageProducer, TcpReceivingChannelAdapter

public abstract class MessageProducerSupport
extends AbstractEndpoint
implements MessageProducer, TrackableComponent

A support class for producer endpoints that provides a setter for the output channel and a convenience method for sending Messages.


Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
MessageProducerSupport()
           
 
Method Summary
protected  void doStart()
          Takes no action by default.
protected  void doStop()
          Takes no action by default.
protected  void onInit()
          Subclasses may implement this for initialization logic.
protected  void sendMessage(Message<?> message)
           
 void setErrorChannel(MessageChannel errorChannel)
           
 void setOutputChannel(MessageChannel outputChannel)
          Specify the MessageChannel to which produced Messages should be sent.
 void setSendTimeout(long sendTimeout)
           
 void setShouldTrack(boolean shouldTrack)
           
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName, getComponentType
 

Constructor Detail

MessageProducerSupport

public MessageProducerSupport()
Method Detail

setOutputChannel

public void setOutputChannel(MessageChannel outputChannel)
Description copied from interface: MessageProducer
Specify the MessageChannel to which produced Messages should be sent.

Specified by:
setOutputChannel in interface MessageProducer

setErrorChannel

public void setErrorChannel(MessageChannel errorChannel)

setSendTimeout

public void setSendTimeout(long sendTimeout)

setShouldTrack

public void setShouldTrack(boolean shouldTrack)
Specified by:
setShouldTrack in interface TrackableComponent

onInit

protected void onInit()
Description copied from class: IntegrationObjectSupport
Subclasses may implement this for initialization logic.

Overrides:
onInit in class IntegrationObjectSupport

doStart

protected void doStart()
Takes no action by default. Subclasses may override this if they need lifecycle-managed behavior.

Specified by:
doStart in class AbstractEndpoint

doStop

protected void doStop()
Takes no action by default. Subclasses may override this if they need lifecycle-managed behavior.

Specified by:
doStop in class AbstractEndpoint

sendMessage

protected void sendMessage(Message<?> message)