org.springframework.integration.ip.config
Class TcpConnectionFactoryFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<AbstractConnectionFactory>
org.springframework.integration.ip.config.TcpConnectionFactoryFactoryBean
- All Implemented Interfaces:
- BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<AbstractConnectionFactory>, InitializingBean, Lifecycle, Phased, SmartLifecycle
public class TcpConnectionFactoryFactoryBean
- extends AbstractFactoryBean<AbstractConnectionFactory>
- implements SmartLifecycle
Instantiates a TcpN(et|io)(Server|Client)ConnectionFactory, depending
on type and using-nio attributes.
- Since:
- 2.0.5
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
host
protected java.lang.String host
port
protected int port
listener
protected TcpListener listener
sender
protected TcpSender sender
soTimeout
protected int soTimeout
deserializer
protected Deserializer<?> deserializer
serializer
protected Serializer<?> serializer
mapper
protected TcpMessageMapper mapper
singleUse
protected boolean singleUse
poolSize
protected int poolSize
active
protected volatile boolean active
interceptorFactoryChain
protected TcpConnectionInterceptorFactoryChain interceptorFactoryChain
TcpConnectionFactoryFactoryBean
public TcpConnectionFactoryFactoryBean()
getObjectType
public java.lang.Class<?> getObjectType()
- Specified by:
getObjectType
in interface FactoryBean<AbstractConnectionFactory>
- Specified by:
getObjectType
in class AbstractFactoryBean<AbstractConnectionFactory>
createInstance
protected AbstractConnectionFactory createInstance()
throws java.lang.Exception
- Specified by:
createInstance
in class AbstractFactoryBean<AbstractConnectionFactory>
- Throws:
java.lang.Exception
setPort
public void setPort(int port)
- Parameters:
port
- the port to set
setHost
public void setHost(java.lang.String host)
- Parameters:
host
- the host to set
setType
public void setType(java.lang.String type)
- Parameters:
server
- the server to set
setLocalAddress
public void setLocalAddress(java.lang.String localAddress)
- Parameters:
localAddress
- - See Also:
AbstractServerConnectionFactory.setLocalAddress(java.lang.String)
setSoTimeout
public void setSoTimeout(int soTimeout)
- Parameters:
soTimeout
- - See Also:
AbstractConnectionFactory.setSoTimeout(int)
setSoReceiveBufferSize
public void setSoReceiveBufferSize(int soReceiveBufferSize)
- Parameters:
soReceiveBufferSize
- - See Also:
AbstractConnectionFactory.setSoReceiveBufferSize(int)
setSoSendBufferSize
public void setSoSendBufferSize(int soSendBufferSize)
- Parameters:
soSendBufferSize
- - See Also:
AbstractConnectionFactory.setSoSendBufferSize(int)
setSoTcpNoDelay
public void setSoTcpNoDelay(boolean soTcpNoDelay)
- Parameters:
soTcpNoDelay
- - See Also:
AbstractConnectionFactory.setSoTcpNoDelay(boolean)
setSoLinger
public void setSoLinger(int soLinger)
- Parameters:
soLinger
- - See Also:
AbstractConnectionFactory.setSoLinger(int)
setSoKeepAlive
public void setSoKeepAlive(boolean soKeepAlive)
- Parameters:
soKeepAlive
- - See Also:
AbstractConnectionFactory.setSoKeepAlive(boolean)
setSoTrafficClass
public void setSoTrafficClass(int soTrafficClass)
- Parameters:
soTrafficClass
- - See Also:
AbstractConnectionFactory.setSoTrafficClass(int)
setUsingNio
public void setUsingNio(boolean usingNio)
- Parameters:
usingNio
- the usingNio to set
setUsingDirectBuffers
public void setUsingDirectBuffers(boolean usingDirectBuffers)
- Parameters:
usingDirectBuffers
- - See Also:
TcpNioServerConnectionFactory.setUsingDirectBuffers(boolean)
setTaskExecutor
public void setTaskExecutor(java.util.concurrent.Executor taskExecutor)
- Parameters:
taskExecutor
- - See Also:
AbstractConnectionFactory.setTaskExecutor(java.util.concurrent.Executor)
setDeserializer
public void setDeserializer(Deserializer<?> deserializer)
- Parameters:
deserializer
- - See Also:
AbstractConnectionFactory.setDeserializer(org.springframework.core.serializer.Deserializer)
setSerializer
public void setSerializer(Serializer<?> serializer)
- Parameters:
serializer
- - See Also:
AbstractConnectionFactory.setSerializer(org.springframework.core.serializer.Serializer)
setMapper
public void setMapper(TcpMessageMapper mapper)
- Parameters:
mapper
- - See Also:
AbstractConnectionFactory.setMapper(org.springframework.integration.ip.tcp.connection.TcpMessageMapper)
setSingleUse
public void setSingleUse(boolean singleUse)
- Parameters:
singleUse
- - See Also:
AbstractConnectionFactory.setSingleUse(boolean)
setPoolSize
public void setPoolSize(int poolSize)
- Parameters:
poolSize
- - See Also:
AbstractConnectionFactory.setPoolSize(int)
setInterceptorFactoryChain
public void setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain)
- Parameters:
interceptorFactoryChain
- - See Also:
AbstractConnectionFactory.setInterceptorFactoryChain(org.springframework.integration.ip.tcp.connection.TcpConnectionInterceptorFactoryChain)
setLookupHost
public void setLookupHost(boolean lookupHost)
- Parameters:
lookupHost
- - See Also:
AbstractConnectionFactory.setLookupHost(boolean)
start
public void start()
- Specified by:
start
in interface Lifecycle
- See Also:
AbstractConnectionFactory.start()
stop
public void stop()
- Specified by:
stop
in interface Lifecycle
- See Also:
AbstractConnectionFactory.stop()
getPhase
public int getPhase()
- Specified by:
getPhase
in interface Phased
- Returns:
- See Also:
AbstractConnectionFactory.getPhase()
isAutoStartup
public boolean isAutoStartup()
- Specified by:
isAutoStartup
in interface SmartLifecycle
- Returns:
- See Also:
AbstractConnectionFactory.isAutoStartup()
stop
public void stop(java.lang.Runnable callback)
- Specified by:
stop
in interface SmartLifecycle
- Parameters:
callback
- - See Also:
AbstractConnectionFactory.stop(java.lang.Runnable)
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interface Lifecycle