org.springframework.integration.ip.tcp.connection
Class TcpNetClientConnectionFactory

java.lang.Object
  extended by org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory
      extended by org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory
          extended by org.springframework.integration.ip.tcp.connection.TcpNetClientConnectionFactory
All Implemented Interfaces:
java.lang.Runnable, Lifecycle, Phased, SmartLifecycle, ConnectionFactory

public class TcpNetClientConnectionFactory
extends AbstractClientConnectionFactory

A client connection factory that creates TcpNetConnections.

Since:
2.0

Field Summary
 
Fields inherited from class org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory
theConnection
 
Fields inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory
active, DEFAULT_REPLY_TIMEOUT, deserializer, host, interceptorFactoryChain, lifecycleMonitor, listener, logger, mapper, poolSize, port, sender, serializer, singleUse, soTimeout
 
Constructor Summary
TcpNetClientConnectionFactory(java.lang.String host, int port)
          Creates a TcpNetClientConnectionFactory for connections to the host and port.
 
Method Summary
 void close()
          Closes the server.
 TcpConnection getConnection()
          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.
 boolean isRunning()
           
 void run()
           
 
Methods inherited from class org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory
initializeConnection
 
Methods inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory
addConnection, doAccept, getHost, getPhase, getPort, getSoLinger, getSoReceiveBufferSize, getSoSendBufferSize, getSoTimeout, getSoTrafficClass, getTaskExecutor, harvestClosedConnections, isAutoStartup, isLookupHost, isSingleUse, isSoKeepAlive, isSoTcpNoDelay, processNioSelections, registerListener, registerSender, setDeserializer, setInterceptorFactoryChain, setLookupHost, setMapper, setPoolSize, setSerializer, 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
 

Constructor Detail

TcpNetClientConnectionFactory

public TcpNetClientConnectionFactory(java.lang.String host,
                                     int port)
Creates a TcpNetClientConnectionFactory for connections to the host and port.

Parameters:
host - the host
port - the port
Method Detail

getConnection

public TcpConnection getConnection()
                            throws java.lang.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:
java.lang.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()