public class TcpNioClientConnectionFactory extends AbstractClientConnectionFactory implements java.lang.Runnable
TcpNioConnection
s.DEFAULT_REPLY_TIMEOUT, lifecycleMonitor
logger
Constructor and Description |
---|
TcpNioClientConnectionFactory(java.lang.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() |
void |
close()
Deprecated.
|
protected java.util.Map<java.nio.channels.SocketChannel,TcpNioConnection> |
getConnections() |
protected java.util.concurrent.BlockingQueue<java.nio.channels.SocketChannel> |
getNewChannels() |
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() |
forceClose, getConnection, getTheConnection, initializeConnection, obtainConnection, obtainNewConnection, obtainSharedConnection, setTheConnection
addConnection, 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 TcpNioClientConnectionFactory(java.lang.String host, int port)
host
- the hostport
- the portprotected void checkActive() throws java.io.IOException
checkActive
in class AbstractConnectionFactory
java.io.IOException
protected TcpConnectionSupport buildNewConnection() throws java.lang.Exception
buildNewConnection
in class AbstractClientConnectionFactory
java.lang.Exception
public void setUsingDirectBuffers(boolean usingDirectBuffers)
usingDirectBuffers
- ByteBuffer
public void setTcpNioConnectionSupport(TcpNioConnectionSupport tcpNioSupport)
@Deprecated public void close()
AbstractConnectionFactory
close
in class AbstractConnectionFactory
public void start()
start
in interface org.springframework.context.Lifecycle
start
in class AbstractConnectionFactory
public void run()
run
in interface java.lang.Runnable
protected boolean isUsingDirectBuffers()
protected java.util.Map<java.nio.channels.SocketChannel,TcpNioConnection> getConnections()
protected java.util.concurrent.BlockingQueue<java.nio.channels.SocketChannel> getNewChannels()