org.springframework.integration.ip.tcp.connection
Class AbstractClientConnectionFactory
java.lang.Object
org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory
org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory
- All Implemented Interfaces:
- Runnable, Lifecycle, Phased, SmartLifecycle, ConnectionFactory
- Direct Known Subclasses:
- TcpNetClientConnectionFactory, TcpNioClientConnectionFactory
public abstract class AbstractClientConnectionFactory
- extends AbstractConnectionFactory
Abstract class for client connection factories; client connection factories
establish outgoing connections.
- Since:
- 2.0
- Author:
- Gary Russell
Fields inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory |
active, DEFAULT_REPLY_TIMEOUT, host, inputConverter, interceptorFactoryChain, listener, logger, mapper, outputConverter, poolSize, port, sender, singleUse, soTimeout, taskExecutor |
Methods inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory |
close, getHost, getPhase, getPort, getSoLinger, getSoReceiveBufferSize, getSoSendBufferSize, getSoTimeout, getSoTrafficClass, isAutoStartup, isSingleUse, isSoKeepAlive, isSoTcpNoDelay, registerListener, registerSender, setInputConverter, setInterceptorFactoryChain, setMapper, setOutputConverter, setPoolSize, setSingleUse, setSocketAttributes, setSoKeepAlive, setSoLinger, setSoReceiveBufferSize, setSoSendBufferSize, setSoTcpNoDelay, setSoTimeout, setSoTrafficClass, setTaskExecutor, start, stop, stop, wrapConnection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
run |
theConnection
protected TcpConnection theConnection
AbstractClientConnectionFactory
public AbstractClientConnectionFactory(String host,
int port)
- Constructs a factory that will established connections to the host and port.
- Parameters:
host
- The host.port
- The port.
initializeConnection
protected void initializeConnection(TcpConnection connection,
Socket socket)
- Transfers attributes such as converters, singleUse etc to a new connection.
When the connection factory has a reference to a TCPListener (to read
responses), or for single use connections, the connection is executed.
Single use connections need to read from the connection in order to
close it after the socket timeout.
- Parameters:
connection
- The new connection.socket
- The new socket.
Copyright © 2010. All Rights Reserved.