public class TcpNetClientConnectionFactory extends AbstractClientConnectionFactory
TcpNetConnection
s.DEFAULT_REPLY_TIMEOUT, lifecycleMonitor
logger
Constructor and Description |
---|
TcpNetClientConnectionFactory(java.lang.String host,
int port)
Creates a TcpNetClientConnectionFactory for connections to the host and port.
|
Modifier and Type | Method and Description |
---|---|
protected TcpConnectionSupport |
buildNewConnection() |
void |
close()
Closes the factory.
|
protected java.net.Socket |
createSocket(java.lang.String host,
int port)
Create a new
Socket . |
protected TcpSocketFactorySupport |
getTcpSocketFactorySupport() |
void |
setTcpSocketFactorySupport(TcpSocketFactorySupport tcpSocketFactorySupport) |
void |
start() |
forceClose, getConnection, getTheConnection, initializeConnection, obtainConnection, obtainNewConnection, obtainSharedConnection, setTheConnection
addConnection, checkActive, closeConnection, doAccept, getApplicationEventPublisher, getDeserializer, getHost, getListener, getMapper, getOpenConnectionIds, getPhase, getPort, getSender, getSerializer, getSoLinger, getSoReceiveBufferSize, getSoSendBufferSize, getSoTimeout, getSoTrafficClass, getTaskExecutor, getTcpSocketSupport, harvestClosedConnections, isActive, isAutoStartup, isLookupHost, isRunning, isSingleUse, isSoKeepAlive, isSoTcpNoDelay, processNioSelections, registerListener, registerSender, setActive, setApplicationEventPublisher, setDeserializer, setInterceptorFactoryChain, setLookupHost, setMapper, setNioHarvestInterval, setSerializer, setSingleUse, setSocketAttributes, setSoKeepAlive, setSoLinger, setSoReceiveBufferSize, setSoSendBufferSize, setSoTcpNoDelay, setSoTimeout, setSoTrafficClass, setTaskExecutor, setTcpSocketSupport, stop, stop, wrapConnection
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
public TcpNetClientConnectionFactory(java.lang.String host, int port)
host
- the hostport
- the portprotected TcpConnectionSupport buildNewConnection() throws java.io.IOException, java.net.SocketException, java.lang.Exception
buildNewConnection
in class AbstractClientConnectionFactory
java.io.IOException
java.net.SocketException
java.lang.Exception
public void start()
start
in interface org.springframework.context.Lifecycle
start
in class AbstractConnectionFactory
protected java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException
Socket
. This default implementation uses the default
SocketFactory
. Override to use some other mechanismhost
- The host.port
- The port.java.io.IOException
public void close()
AbstractConnectionFactory
close
in class AbstractConnectionFactory
protected TcpSocketFactorySupport getTcpSocketFactorySupport()
public void setTcpSocketFactorySupport(TcpSocketFactorySupport tcpSocketFactorySupport)