public abstract class AbstractClientConnectionFactory extends AbstractConnectionFactory
DEFAULT_REPLY_TIMEOUT, lifecycleMonitorlogger| Constructor and Description |
|---|
AbstractClientConnectionFactory(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,
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, 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, onInit, 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, wrapConnectionafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toStringpublic AbstractClientConnectionFactory(String host, int port)
host - The host.port - The port.public TcpConnectionSupport getConnection() throws 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.Exceptionprotected TcpConnectionSupport obtainConnection() throws Exception
Exceptionprotected final TcpConnectionSupport obtainSharedConnection() throws InterruptedException
InterruptedExceptionprotected final TcpConnectionSupport obtainNewConnection() throws Exception
Exceptionprotected TcpConnectionSupport buildNewConnection() throws Exception
Exceptionprotected void initializeConnection(TcpConnectionSupport connection, 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 - The connection.