Spring Integration

org.springframework.integration.ip.config
Class TcpConnectionFactoryFactoryBean

java.lang.Object
  extended by org.springframework.beans.factory.config.AbstractFactoryBean<AbstractConnectionFactory>
      extended by org.springframework.integration.ip.config.TcpConnectionFactoryFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<AbstractConnectionFactory>, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public class TcpConnectionFactoryFactoryBean
extends org.springframework.beans.factory.config.AbstractFactoryBean<AbstractConnectionFactory>
implements org.springframework.context.SmartLifecycle, org.springframework.beans.factory.BeanNameAware

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
 
Constructor Summary
TcpConnectionFactoryFactoryBean()
           
 
Method Summary
protected  AbstractConnectionFactory createInstance()
           
 java.lang.Class<?> getObjectType()
           
 int getPhase()
           
 boolean isAutoStartup()
           
 boolean isRunning()
           
 void setApplySequence(boolean applySequence)
           
 void setBacklog(int backlog)
           
 void setBeanName(java.lang.String name)
           
 void setDeserializer(org.springframework.core.serializer.Deserializer<?> deserializer)
           
 void setHost(java.lang.String host)
           
 void setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain)
           
 void setLocalAddress(java.lang.String localAddress)
           
 void setLookupHost(boolean lookupHost)
           
 void setMapper(TcpMessageMapper mapper)
           
 void setNioConnectionSupport(TcpNioConnectionSupport tcpNioSupport)
          Rare property - not exposed through namespace
 void setPoolSize(int poolSize)
          Deprecated.  
 void setPort(int port)
           
 void setSerializer(org.springframework.core.serializer.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 setTaskExecutor(java.util.concurrent.Executor taskExecutor)
           
 void setType(java.lang.String type)
           
 void setUsingDirectBuffers(boolean usingDirectBuffers)
           
 void setUsingNio(boolean usingNio)
           
 void start()
           
 void stop()
           
 void stop(java.lang.Runnable callback)
           
 
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
 

Constructor Detail

TcpConnectionFactoryFactoryBean

public TcpConnectionFactoryFactoryBean()
Method Detail

getObjectType

public java.lang.Class<?> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<AbstractConnectionFactory>
Specified by:
getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<AbstractConnectionFactory>

createInstance

protected AbstractConnectionFactory createInstance()
                                            throws java.lang.Exception
Specified by:
createInstance in class org.springframework.beans.factory.config.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:
type - the type 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(org.springframework.core.serializer.Deserializer<?> deserializer)
Parameters:
deserializer -
See Also:
AbstractConnectionFactory.setDeserializer(org.springframework.core.serializer.Deserializer)

setSerializer

public void setSerializer(org.springframework.core.serializer.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

@Deprecated
public void setPoolSize(int poolSize)
Deprecated. 

Parameters:
poolSize -
See Also:
AbstractConnectionFactory.setPoolSize(int)

setBacklog

public void setBacklog(int backlog)
Parameters:
backlog -
See Also:
AbstractServerConnectionFactory.setBacklog(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 org.springframework.context.Lifecycle
See Also:
AbstractConnectionFactory.start()

stop

public void stop()
Specified by:
stop in interface org.springframework.context.Lifecycle
See Also:
AbstractConnectionFactory.stop()

getPhase

public int getPhase()
Specified by:
getPhase in interface org.springframework.context.Phased
Returns:
phase
See Also:
AbstractConnectionFactory.getPhase()

isAutoStartup

public boolean isAutoStartup()
Specified by:
isAutoStartup in interface org.springframework.context.SmartLifecycle
Returns:
isAutoStartup
See Also:
AbstractConnectionFactory.isAutoStartup()

stop

public void stop(java.lang.Runnable callback)
Specified by:
stop in interface org.springframework.context.SmartLifecycle
Parameters:
callback -
See Also:
AbstractConnectionFactory.stop(java.lang.Runnable)

isRunning

public boolean isRunning()
Specified by:
isRunning in interface org.springframework.context.Lifecycle

setBeanName

public void setBeanName(java.lang.String name)
Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware

setApplySequence

public void setApplySequence(boolean applySequence)
Parameters:
applySequence - the applySequence to set

setSslContextSupport

public void setSslContextSupport(TcpSSLContextSupport sslContextSupport)

setSocketSupport

public void setSocketSupport(TcpSocketSupport tcpSocketSupport)

setNioConnectionSupport

public void setNioConnectionSupport(TcpNioConnectionSupport tcpNioSupport)
Rare property - not exposed through namespace

Parameters:
tcpNioSupport -

setSocketFactorySupport

public void setSocketFactorySupport(TcpSocketFactorySupport tcpSocketFactorySupport)

Spring Integration