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

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  void sendMessage(Message<?> message)
           
 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
doStart, doStop, getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getRequiredMetadataPersister, 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

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

sendMessage

protected void sendMessage(Message<?> message)

Spring Integration

Copyright © 2010. All Rights Reserved.