public abstract class AbstractClientConnectionFactory extends AbstractConnectionFactory
DEFAULT_REPLY_TIMEOUT, lifecycleMonitor
logger
Constructor and Description |
---|
AbstractClientConnectionFactory(java.lang.String host,
int port)
Constructs a factory that will established connections to the host and port.
|
Modifier and Type | Method and Description |
---|---|
protected TcpConnectionSupport |
buildNewConnection() |
void |
forceClose(TcpConnection connection)
Force close the connection and null the field if it's
a shared connection.
|
TcpConnectionSupport |
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. |
protected TcpConnectionSupport |
getTheConnection() |
protected void |
initializeConnection(TcpConnectionSupport connection,
java.net.Socket socket)
Transfers attributes such as (de)serializers, singleUse etc to a new connection.
|
protected TcpConnectionSupport |
obtainConnection() |
protected TcpConnectionSupport |
obtainNewConnection() |
protected TcpConnectionSupport |
obtainSharedConnection() |
protected void |
setTheConnection(TcpConnectionSupport theConnection) |
addConnection, checkActive, close, 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, start, stop, stop, wrapConnection
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
public AbstractClientConnectionFactory(java.lang.String host, int port)
host
- The host.port
- The port.public TcpConnectionSupport getConnection() throws java.lang.Exception
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.java.lang.Exception
protected TcpConnectionSupport obtainConnection() throws java.lang.Exception
java.lang.Exception
protected final TcpConnectionSupport obtainSharedConnection() throws java.lang.InterruptedException
java.lang.InterruptedException
protected final TcpConnectionSupport obtainNewConnection() throws java.lang.Exception
java.lang.Exception
protected TcpConnectionSupport buildNewConnection() throws java.lang.Exception
java.lang.Exception
protected void initializeConnection(TcpConnectionSupport connection, java.net.Socket socket)
connection
- The new connection.socket
- The new socket.protected void setTheConnection(TcpConnectionSupport theConnection)
theConnection
- the theConnection to setprotected TcpConnectionSupport getTheConnection()
public void forceClose(TcpConnection connection)
connection
-