public class TcpNetClientConnectionFactory extends AbstractClientConnectionFactory
TcpNetConnection
s.DEFAULT_REPLY_TIMEOUT, lifecycleMonitor
EXPRESSION_PARSER, 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() |
protected java.net.Socket |
createSocket(java.lang.String host,
int port)
Create a new
Socket . |
protected TcpSocketFactorySupport |
getTcpSocketFactorySupport() |
void |
setTcpNetConnectionSupport(TcpNetConnectionSupport connectionSupport)
Set the
TcpNetConnectionSupport to use to create connection objects. |
void |
setTcpSocketFactorySupport(TcpSocketFactorySupport tcpSocketFactorySupport) |
void |
start() |
enableManualListenerRegistration, forceClose, getConnection, getTheConnection, initializeConnection, obtainConnection, obtainNewConnection, obtainSharedConnection, setTheConnection
addConnection, checkActive, closeConnection, delayRead, doAccept, getApplicationEventPublisher, getDelayedReads, getDeserializer, getHost, getListener, getMapper, getOpenConnectionIds, getPort, getReadDelay, getSender, getSerializer, getSoLinger, getSoReceiveBufferSize, getSoSendBufferSize, getSoTimeout, getSoTrafficClass, getSslHandshakeTimeout, getTaskExecutor, getTcpSocketSupport, harvestClosedConnections, isActive, isLookupHost, isRunning, isSingleUse, isSoKeepAlive, isSoTcpNoDelay, onInit, processNioSelections, registerListener, registerSender, setActive, setApplicationEventPublisher, setDeserializer, setHost, setInterceptorFactoryChain, setLeaveOpen, setLookupHost, setMapper, setNioHarvestInterval, setPort, setReadDelay, setSerializer, setSingleUse, setSocketAttributes, setSoKeepAlive, setSoLinger, setSoReceiveBufferSize, setSoSendBufferSize, setSoTcpNoDelay, setSoTimeout, setSoTrafficClass, setSslHandshakeTimeout, setTaskExecutor, setTcpSocketSupport, stop, toString, wrapConnection
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler
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 setTcpNetConnectionSupport(TcpNetConnectionSupport connectionSupport)
TcpNetConnectionSupport
to use to create connection objects.connectionSupport
- the connection support.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
- Any IOException.protected TcpSocketFactorySupport getTcpSocketFactorySupport()
public void setTcpSocketFactorySupport(TcpSocketFactorySupport tcpSocketFactorySupport)