Spring Integration

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, MessageProducer, NamedComponent
Direct Known Subclasses:
AbstractInternetProtocolReceivingChannelAdapter, ApplicationEventInboundChannelAdapter, ImapIdleChannelAdapter, NotificationListeningMessageProducer, ScheduledMessageProducer, TcpReceivingChannelAdapter

public abstract class MessageProducerSupport
extends AbstractEndpoint
implements MessageProducer

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

Author:
Mark Fisher

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

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

setSendTimeout

public void setSendTimeout(long sendTimeout)

onInit

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

Overrides:
onInit in class IntegrationObjectSupport

sendMessage

protected boolean sendMessage(Message<?> message)

Spring Integration

Copyright © 2010. All Rights Reserved.