Spring Integration

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.Aware, 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, NamedComponent, MessageProducer, TrackableComponent, CommonSocketOptions
Direct Known Subclasses:
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
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
AbstractInternetProtocolReceivingChannelAdapter(int port)
           
 
Method Summary
protected  void checkTaskExecutor(java.lang.String threadName)
          Creates a default task executor if none was supplied.
protected  void doStart()
          Protected by lifecycleLock
protected  void doStop()
          Takes no action by default.
 java.lang.String getLocalAddress()
           
 int getPort()
           
 int getReceiveBufferSize()
           
 int getSoReceiveBufferSize()
           
 int getSoTimeout()
           
 java.util.concurrent.Executor getTaskExecutor()
           
 boolean isActive()
           
 boolean isListening()
           
 void setListening(boolean listening)
           
 void setLocalAddress(java.lang.String localAddress)
          On a multi-homed system, specifies the ip address of the network interface used to communicate.
 void setPoolSize(int poolSize)
           
 void setReceiveBufferSize(int receiveBufferSize)
           
 void setSoReceiveBufferSize(int soReceiveBufferSize)
           
 void setSoTimeout(int soTimeout)
           
 void setTaskExecutor(java.util.concurrent.Executor taskExecutor)
           
 
Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
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 java.lang.Runnable
run
 
Methods inherited from interface org.springframework.integration.ip.CommonSocketOptions
setSoSendBufferSize
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName, getComponentType
 

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
See Also:
Socket.setSoTimeout(int), DatagramSocket.setSoTimeout(int)

getSoTimeout

public int getSoTimeout()
Returns:
the soTimeout

setSoReceiveBufferSize

public void setSoReceiveBufferSize(int soReceiveBufferSize)
Specified by:
setSoReceiveBufferSize in interface CommonSocketOptions
See Also:
Socket.setReceiveBufferSize(int), DatagramSocket.setReceiveBufferSize(int)

getSoReceiveBufferSize

public int getSoReceiveBufferSize()
Returns:
the soReceiveBufferSize

setReceiveBufferSize

public void setReceiveBufferSize(int receiveBufferSize)

getReceiveBufferSize

public int getReceiveBufferSize()
Returns:
the receiveBufferSize

doStart

protected void doStart()
Protected by lifecycleLock

Overrides:
doStart in class MessageProducerSupport

checkTaskExecutor

protected void checkTaskExecutor(java.lang.String threadName)
Creates a default task executor if none was supplied.

Parameters:
threadName -

doStop

protected void doStop()
Description copied from class: MessageProducerSupport
Takes no action by default. Subclasses may override this if they need lifecycle-managed behavior.

Overrides:
doStop in class MessageProducerSupport

isListening

public boolean isListening()

setListening

public void setListening(boolean listening)
Parameters:
listening - the listening to set

getLocalAddress

public java.lang.String getLocalAddress()

setLocalAddress

public void setLocalAddress(java.lang.String localAddress)
Description copied from interface: CommonSocketOptions
On a multi-homed system, specifies the ip address of the network interface used to communicate. For inbound adapters and gateways, specifies the interface used to listed for incoming connections. If omitted, the endpoint will listen on all available adapters. For the UDP multicast outbound adapter specifies the interface to which multicast packets will be sent. For UDP unicast and multicast adapters, specifies which interface to which the acknowledgment socket will be bound. Does not apply to TCP outbound adapters and gateways.

Specified by:
setLocalAddress in interface CommonSocketOptions

setPoolSize

public void setPoolSize(int poolSize)

setTaskExecutor

public void setTaskExecutor(java.util.concurrent.Executor taskExecutor)

getTaskExecutor

public java.util.concurrent.Executor getTaskExecutor()
Returns:
the taskExecutor

isActive

public boolean isActive()
Returns:
the active

Spring Integration