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
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractConnectionFactory
Class<?>
boolean
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
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) final void
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:
-
setSoTimeout
public void setSoTimeout(int soTimeout) - Parameters:
soTimeout
- The timeout, in milliseconds.- See Also:
-
setSoReceiveBufferSize
public void setSoReceiveBufferSize(int soReceiveBufferSize) - Parameters:
soReceiveBufferSize
- The receive buffer size.- See Also:
-
setSoSendBufferSize
public void setSoSendBufferSize(int soSendBufferSize) - Parameters:
soSendBufferSize
- The send buffer size.- See Also:
-
setSoTcpNoDelay
public void setSoTcpNoDelay(boolean soTcpNoDelay) - Parameters:
soTcpNoDelay
- The TCP no delay to set.- See Also:
-
setSoLinger
public void setSoLinger(int soLinger) - Parameters:
soLinger
- The SO Linger to set.- See Also:
-
setSoKeepAlive
public void setSoKeepAlive(boolean soKeepAlive) - Parameters:
soKeepAlive
- The SO keepalive to set.- See Also:
-
setSoTrafficClass
public void setSoTrafficClass(int soTrafficClass) - Parameters:
soTrafficClass
- The SO traffic class to set.- See Also:
-
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:
-
setTaskExecutor
- Parameters:
taskExecutor
- The task executor.- See Also:
-
setDeserializer
- Parameters:
deserializer
- The deserializer.- See Also:
-
setSerializer
- Parameters:
serializer
- The serializer.- See Also:
-
setMapper
- Parameters:
mapper
- The mapper.- See Also:
-
setSingleUse
public void setSingleUse(boolean singleUse) - Parameters:
singleUse
- The singleUse to set.- See Also:
-
setBacklog
public void setBacklog(int backlog) - Parameters:
backlog
- The backlog.- See Also:
-
setInterceptorFactoryChain
public void setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain) - Parameters:
interceptorFactoryChain
- The interceptor factory chain.- See Also:
-
setLookupHost
public void setLookupHost(boolean lookupHost) - Parameters:
lookupHost
- The lookupHost to set.- See Also:
-
start
public void start() -
stop
public void 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
-