org.springframework.integration.ip
Class AbstractInternetProtocolReceivingChannelAdapter
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.ip.AbstractInternetProtocolReceivingChannelAdapter
- All Implemented Interfaces:
- java.lang.Runnable, BeanFactoryAware, BeanNameAware, InitializingBean, Lifecycle, Phased, 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
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 |
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
listening
protected volatile boolean listening
localAddress
protected volatile java.lang.String localAddress
taskExecutor
protected volatile java.util.concurrent.Executor taskExecutor
poolSize
protected volatile int poolSize
AbstractInternetProtocolReceivingChannelAdapter
public AbstractInternetProtocolReceivingChannelAdapter(int port)
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)
setSoReceiveBufferSize
public void setSoReceiveBufferSize(int soReceiveBufferSize)
- Specified by:
setSoReceiveBufferSize
in interface CommonSocketOptions
- See Also:
Socket.setReceiveBufferSize(int)
,
DatagramSocket.setReceiveBufferSize(int)
setSoSendBufferSize
public void setSoSendBufferSize(int soSendBufferSize)
- Specified by:
setSoSendBufferSize
in interface CommonSocketOptions
- See Also:
Socket.setSendBufferSize(int)
,
DatagramSocket.setSendBufferSize(int)
setReceiveBufferSize
public void setReceiveBufferSize(int receiveBufferSize)
doStart
protected void doStart()
- Description copied from class:
MessageProducerSupport
- Takes no action by default. Subclasses may override this if they
need lifecycle-managed behavior.
- 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()
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)