public class TcpNioClientConnectionFactory extends AbstractClientConnectionFactory implements java.lang.Runnable
TcpNioConnections.DEFAULT_REPLY_TIMEOUT, lifecycleMonitor| 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() |
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() |
void |
stop()
Stops the server.
|
enableManualListenerRegistration, forceClose, getConnection, getTheConnection, initializeConnection, obtainConnection, obtainNewConnection, obtainSharedConnection, setTheConnectionaddConnection, closeConnection, delayRead, doAccept, getApplicationEventPublisher, getDelayedReads, getDeserializer, getHost, getListener, getMapper, getOpenConnectionIds, getPhase, getPort, getReadDelay, 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, setReadDelay, setSerializer, setSingleUse, setSocketAttributes, setSoKeepAlive, setSoLinger, setSoReceiveBufferSize, setSoSendBufferSize, setSoTcpNoDelay, setSoTimeout, setSoTrafficClass, setTaskExecutor, setTcpSocketSupport, stop, wrapConnectionafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toStringpublic TcpNioClientConnectionFactory(java.lang.String host,
int port)
host - the hostport - the portprotected void checkActive()
throws java.io.IOException
checkActive in class AbstractConnectionFactoryjava.io.IOExceptionprotected TcpConnectionSupport buildNewConnection() throws java.lang.Exception
buildNewConnection in class AbstractClientConnectionFactoryjava.lang.Exceptionpublic void setUsingDirectBuffers(boolean usingDirectBuffers)
usingDirectBuffers - The usingDirectBuffers to set.ByteBufferpublic void setTcpNioConnectionSupport(TcpNioConnectionSupport tcpNioSupport)
public void stop()
AbstractConnectionFactorystop in interface org.springframework.context.Lifecyclestop in class AbstractConnectionFactorypublic void start()
start in interface org.springframework.context.Lifecyclestart in class AbstractConnectionFactorypublic void run()
run in interface java.lang.Runnableprotected boolean isUsingDirectBuffers()
protected java.util.Map<java.nio.channels.SocketChannel,TcpNioConnection> getConnections()
protected java.util.concurrent.BlockingQueue<java.nio.channels.SocketChannel> getNewChannels()