Class TcpConnectionFactoryFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<AbstractConnectionFactory>
org.springframework.integration.ip.config.TcpConnectionFactoryFactoryBean
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,BeanNameAware
,DisposableBean
,FactoryBean<AbstractConnectionFactory>
,InitializingBean
,ApplicationContextAware
,ApplicationEventPublisherAware
,Lifecycle
public class TcpConnectionFactoryFactoryBean extends AbstractFactoryBean<AbstractConnectionFactory> implements Lifecycle, BeanNameAware, ApplicationEventPublisherAware, ApplicationContextAware
Instantiates a TcpN(et|io)(Server|Client)ConnectionFactory, depending
on type and using-nio attributes.
- Since:
- 2.0.5
- Author:
- Gary Russell
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TcpConnectionFactoryFactoryBean()
TcpConnectionFactoryFactoryBean(String type)
-
Method Summary
Modifier and Type Method Description protected AbstractConnectionFactory
createInstance()
Class<?>
getObjectType()
boolean
isRunning()
void
setApplicationContext(ApplicationContext applicationContext)
void
setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
void
setApplySequence(boolean applySequence)
void
setBacklog(int backlog)
void
setBeanName(String name)
void
setConnectTimeout(int connectTimeout)
void
setDeserializer(Deserializer<?> deserializer)
void
setHost(String host)
void
setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain)
void
setLocalAddress(String localAddress)
void
setLookupHost(boolean lookupHost)
void
setMapper(TcpMessageMapper mapper)
void
setNetConnectionSupport(TcpNetConnectionSupport tcpNetSupport)
void
setNioConnectionSupport(TcpNioConnectionSupport tcpNioSupport)
void
setPort(int port)
void
setReadDelay(long readDelay)
void
setSerializer(Serializer<?> serializer)
void
setSingleUse(boolean singleUse)
void
setSocketFactorySupport(TcpSocketFactorySupport tcpSocketFactorySupport)
void
setSocketSupport(TcpSocketSupport tcpSocketSupport)
void
setSoKeepAlive(boolean soKeepAlive)
void
setSoLinger(int soLinger)
void
setSoReceiveBufferSize(int soReceiveBufferSize)
void
setSoSendBufferSize(int soSendBufferSize)
void
setSoTcpNoDelay(boolean soTcpNoDelay)
void
setSoTimeout(int soTimeout)
void
setSoTrafficClass(int soTrafficClass)
void
setSslContextSupport(TcpSSLContextSupport sslContextSupport)
void
setSslHandshakeTimeout(Integer sslHandshakeTimeout)
Set the SSL handshake timeout (only used with SSL and NIO).void
setTaskExecutor(Executor taskExecutor)
void
setType(String type)
void
setUsingDirectBuffers(boolean usingDirectBuffers)
void
setUsingNio(boolean usingNio)
void
start()
void
stop()
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
TcpConnectionFactoryFactoryBean
public TcpConnectionFactoryFactoryBean() -
TcpConnectionFactoryFactoryBean
-
-
Method Details
-
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<AbstractConnectionFactory>
- Specified by:
getObjectType
in classAbstractFactoryBean<AbstractConnectionFactory>
-
createInstance
- Specified by:
createInstance
in classAbstractFactoryBean<AbstractConnectionFactory>
-
setPort
public void setPort(int port)- Parameters:
port
- the port to set
-
setHost
- Parameters:
host
- the host to set
-
setType
- Parameters:
type
- the type to set
-
setLocalAddress
- Parameters:
localAddress
- The local address.- See Also:
AbstractServerConnectionFactory.setLocalAddress(java.lang.String)
-
setSoTimeout
public void setSoTimeout(int soTimeout)- Parameters:
soTimeout
- The timeout.- See Also:
AbstractConnectionFactory.setSoTimeout(int)
-
setSoReceiveBufferSize
public void setSoReceiveBufferSize(int soReceiveBufferSize)- Parameters:
soReceiveBufferSize
- The receive buffer size.- See Also:
AbstractConnectionFactory.setSoReceiveBufferSize(int)
-
setSoSendBufferSize
public void setSoSendBufferSize(int soSendBufferSize)- Parameters:
soSendBufferSize
- The send buffer size.- See Also:
AbstractConnectionFactory.setSoSendBufferSize(int)
-
setSoTcpNoDelay
public void setSoTcpNoDelay(boolean soTcpNoDelay)- Parameters:
soTcpNoDelay
- The TCP no delay to set.- See Also:
AbstractConnectionFactory.setSoTcpNoDelay(boolean)
-
setSoLinger
public void setSoLinger(int soLinger)- Parameters:
soLinger
- The SO Linger to set.- See Also:
AbstractConnectionFactory.setSoLinger(int)
-
setSoKeepAlive
public void setSoKeepAlive(boolean soKeepAlive)- Parameters:
soKeepAlive
- The SO keepalive to set.- See Also:
AbstractConnectionFactory.setSoKeepAlive(boolean)
-
setSoTrafficClass
public void setSoTrafficClass(int soTrafficClass)- Parameters:
soTrafficClass
- The SO traffic class to set.- 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
- the usingDirectBuffers to set.- See Also:
TcpNioServerConnectionFactory.setUsingDirectBuffers(boolean)
-
setTaskExecutor
- Parameters:
taskExecutor
- The task executor.- See Also:
AbstractConnectionFactory.setTaskExecutor(java.util.concurrent.Executor)
-
setDeserializer
- Parameters:
deserializer
- The deserializer.- See Also:
AbstractConnectionFactory.setDeserializer(org.springframework.core.serializer.Deserializer)
-
setSerializer
- Parameters:
serializer
- The serializer.- See Also:
AbstractConnectionFactory.setSerializer(org.springframework.core.serializer.Serializer)
-
setMapper
- Parameters:
mapper
- The mapper.- See Also:
AbstractConnectionFactory.setMapper(TcpMessageMapper)
-
setSingleUse
public void setSingleUse(boolean singleUse)- Parameters:
singleUse
- The singleUse to set.- See Also:
AbstractConnectionFactory.setSingleUse(boolean)
-
setBacklog
public void setBacklog(int backlog)- Parameters:
backlog
- The backlog.- See Also:
AbstractServerConnectionFactory.setBacklog(int)
-
setInterceptorFactoryChain
public void setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain)- Parameters:
interceptorFactoryChain
- The interceptor factory chain.- See Also:
AbstractConnectionFactory.setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain)
-
setLookupHost
public void setLookupHost(boolean lookupHost)- Parameters:
lookupHost
- The lookupHost to set.- See Also:
AbstractConnectionFactory.setLookupHost(boolean)
-
start
public void start()- Specified by:
start
in interfaceLifecycle
- See Also:
AbstractConnectionFactory.start()
-
stop
public void stop()- Specified by:
stop
in interfaceLifecycle
- See Also:
AbstractConnectionFactory.stop()
-
isRunning
public boolean isRunning() -
setBeanName
- Specified by:
setBeanName
in interfaceBeanNameAware
-
setApplySequence
public void setApplySequence(boolean applySequence)- Parameters:
applySequence
- the applySequence to set
-
setReadDelay
public void setReadDelay(long readDelay) -
setSslContextSupport
-
setSocketSupport
-
setNioConnectionSupport
-
setNetConnectionSupport
-
setSocketFactorySupport
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisher
in interfaceApplicationEventPublisherAware
-
setConnectTimeout
public void setConnectTimeout(int connectTimeout) -
setSslHandshakeTimeout
Set the SSL handshake timeout (only used with SSL and NIO).- Parameters:
sslHandshakeTimeout
- the timeout.- Since:
- 4.3.6
-