public class TcpNioClientConnectionFactory extends AbstractClientConnectionFactory implements SchedulingAwareRunnable
TcpNioConnection
s.DEFAULT_REPLY_TIMEOUT, lifecycleMonitor
EXPRESSION_PARSER, logger
Constructor and Description |
---|
TcpNioClientConnectionFactory(String host,
int port)
Creates a TcpNioClientConnectionFactory for connections to the host and port.
|
Modifier and Type | Method and Description |
---|---|
protected TcpConnectionSupport |
buildNewConnection() |
protected void |
checkActive() |
protected Map<SocketChannel,TcpNioConnection> |
getConnections() |
protected BlockingQueue<SocketChannel> |
getNewChannels() |
boolean |
isLongLived() |
protected boolean |
isUsingDirectBuffers() |
void |
run() |
void |
setTcpNioConnectionSupport(TcpNioConnectionSupport tcpNioSupport) |
void |
setUsingDirectBuffers(boolean usingDirectBuffers)
When set to true, connections created by this factory attempt
to use direct buffers where possible.
|
void |
start() |
void |
stop()
Stops the server.
|
enableManualListenerRegistration, forceClose, getConnection, getConnectionTest, getConnectTimeout, getTheConnection, initializeConnection, obtainConnection, obtainNewConnection, obtainSharedConnection, setConnectionTest, setConnectTimeout, setTheConnection
addConnection, closeConnection, delayRead, doAccept, getApplicationEventPublisher, getDelayedReads, getDeserializer, getHost, getLifecycleMonitor, getListener, getMapper, getOpenConnectionIds, getPort, getReadDelay, getSender, getSenders, 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, toString, unregisterSender, wrapConnection
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler
public TcpNioClientConnectionFactory(String host, int port)
host
- the hostport
- the portprotected void checkActive()
checkActive
in class AbstractConnectionFactory
protected TcpConnectionSupport buildNewConnection()
buildNewConnection
in class AbstractClientConnectionFactory
public void setUsingDirectBuffers(boolean usingDirectBuffers)
usingDirectBuffers
- The usingDirectBuffers to set.ByteBuffer
public void setTcpNioConnectionSupport(TcpNioConnectionSupport tcpNioSupport)
public boolean isLongLived()
isLongLived
in interface SchedulingAwareRunnable
public void stop()
AbstractConnectionFactory
stop
in interface Lifecycle
stop
in interface ManageableLifecycle
stop
in class AbstractConnectionFactory
public void start()
start
in interface Lifecycle
start
in interface ManageableLifecycle
start
in class AbstractConnectionFactory
protected boolean isUsingDirectBuffers()
protected Map<SocketChannel,TcpNioConnection> getConnections()
protected BlockingQueue<SocketChannel> getNewChannels()