org.springframework.integration.ip.tcp.connection
Class TcpNetClientConnectionFactory
java.lang.Object
org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory
org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory
org.springframework.integration.ip.tcp.connection.TcpNetClientConnectionFactory
- All Implemented Interfaces:
- Runnable, Lifecycle, Phased, SmartLifecycle, ConnectionFactory
public class TcpNetClientConnectionFactory
- extends AbstractClientConnectionFactory
A client connection factory that creates TcpNetConnection
s.
- 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 |
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 |
TcpNetClientConnectionFactory
public TcpNetClientConnectionFactory(String host,
int port)
- Creates a TcpNetClientConnectionFactory for connections to the host and port.
- Parameters:
host
- the hostport
- the port
getConnection
public TcpConnection getConnection()
throws Exception
- Obtains a connection - if
AbstractConnectionFactory.setSingleUse(boolean)
was called with
true, a new connection is returned; otherwise a single connection is
reused for all requests while the connection remains open.
- Throws:
Exception
close
public void close()
- Description copied from class:
AbstractConnectionFactory
- Closes the server.
- Specified by:
close
in class AbstractConnectionFactory
run
public void run()
isRunning
public boolean isRunning()
Copyright © 2010. All Rights Reserved.