Spring Integration

org.springframework.integration.ip.tcp.connection
Class TcpConnectionEventListeningMessageProducer

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.endpoint.MessageProducerSupport
              extended by org.springframework.integration.ip.tcp.connection.TcpConnectionEventListeningMessageProducer
All Implemented Interfaces:
java.util.EventListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener<TcpConnectionEvent>, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, NamedComponent, MessageProducer, TrackableComponent

public class TcpConnectionEventListeningMessageProducer
extends MessageProducerSupport
implements org.springframework.context.ApplicationListener<TcpConnectionEvent>

MessageProducer that produces Messages with @link TcpConnectionEvent payloads.

Since:
3.0
Author:
Gary Russell

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
TcpConnectionEventListeningMessageProducer()
           
 
Method Summary
protected  Message<TcpConnectionEvent> messageFromEvent(TcpConnectionEvent event)
           
 void onApplicationEvent(TcpConnectionEvent event)
           
 void setEventTypes(java.lang.Class<? extends TcpConnectionEvent>[] eventTypes)
          Set the list of event types (classes that extend TcpConnectionEvent) that this adapter should send to the message channel.
 
Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
doStart, doStop, onInit, sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrack
 
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

TcpConnectionEventListeningMessageProducer

public TcpConnectionEventListeningMessageProducer()
Method Detail

setEventTypes

public void setEventTypes(java.lang.Class<? extends TcpConnectionEvent>[] eventTypes)
Set the list of event types (classes that extend TcpConnectionEvent) that this adapter should send to the message channel. By default, all event types will be sent.


onApplicationEvent

public void onApplicationEvent(TcpConnectionEvent event)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener<TcpConnectionEvent>

messageFromEvent

protected Message<TcpConnectionEvent> messageFromEvent(TcpConnectionEvent event)

Spring Integration