org.springframework.integration.ip
Class AbstractInternetProtocolReceivingChannelAdapter

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.AbstractInternetProtocolReceivingChannelAdapter
All Implemented Interfaces:
java.lang.Runnable, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, MessageProducer, CommonSocketOptions, ComponentMetadataProvider
Direct Known Subclasses:
AbstractTcpReceivingChannelAdapter, UnicastReceivingChannelAdapter

public abstract class AbstractInternetProtocolReceivingChannelAdapter
extends MessageProducerSupport
implements java.lang.Runnable, CommonSocketOptions

Base class for inbound TCP/UDP Channel Adapters.

Since:
2.0
Author:
Mark Fisher, Gary Russell

Field Summary
protected  boolean active
           
protected  int port
           
protected  int receiveBufferSize
           
protected  int soReceiveBufferSize
           
protected  int soTimeout
           
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
AbstractInternetProtocolReceivingChannelAdapter(int port)
           
 
Method Summary
protected  void doStart()
          Subclasses must implement this method with the start behavior.
protected  void doStop()
          Subclasses must implement this method with the stop behavior.
 int getPort()
           
 void setReceiveBufferSize(int receiveBufferSize)
           
 void setSoReceiveBufferSize(int soReceiveBufferSize)
           
 void setSoSendBufferSize(int soSendBufferSize)
           
 void setSoTimeout(int soTimeout)
           
 
Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
onInit, sendMessage, setOutputChannel, setSendTimeout
 
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, getBeanName, getChannelResolver, getComponentMetadata, getConversionService, getTaskScheduler, populateComponentMetadata, setBeanFactory, setBeanName, setChannelResolver, setConversionService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

port

protected final int port

soTimeout

protected volatile int soTimeout

soReceiveBufferSize

protected volatile int soReceiveBufferSize

receiveBufferSize

protected volatile int receiveBufferSize

active

protected volatile boolean active
Constructor Detail

AbstractInternetProtocolReceivingChannelAdapter

public AbstractInternetProtocolReceivingChannelAdapter(int port)
Method Detail

getPort

public int getPort()
Returns:
The port on which this receiver is listening.

setSoTimeout

public void setSoTimeout(int soTimeout)
Specified by:
setSoTimeout in interface CommonSocketOptions

setSoReceiveBufferSize

public void setSoReceiveBufferSize(int soReceiveBufferSize)
Specified by:
setSoReceiveBufferSize in interface CommonSocketOptions

setSoSendBufferSize

public void setSoSendBufferSize(int soSendBufferSize)
Specified by:
setSoSendBufferSize in interface CommonSocketOptions

setReceiveBufferSize

public void setReceiveBufferSize(int receiveBufferSize)

doStart

protected void doStart()
Description copied from class: AbstractEndpoint
Subclasses must implement this method with the start behavior. This method will be invoked while holding the AbstractEndpoint.lifecycleLock.

Specified by:
doStart in class AbstractEndpoint

doStop

protected void doStop()
Description copied from class: AbstractEndpoint
Subclasses must implement this method with the stop behavior. This method will be invoked while holding the AbstractEndpoint.lifecycleLock.

Specified by:
doStop in class AbstractEndpoint