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, 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
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 |
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)
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