public class TcpNioServerConnectionFactory extends AbstractServerConnectionFactory
TcpNioConnections using
a ServerSocketChannel. Must have a TcpListener registered.DEFAULT_REPLY_TIMEOUT, lifecycleMonitorlogger| Constructor and Description |
|---|
TcpNioServerConnectionFactory(int port)
Listens for incoming connections on the port.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the factory.
|
protected void |
doAccept(java.nio.channels.Selector selector,
java.nio.channels.ServerSocketChannel server,
long now) |
protected java.util.Map<java.nio.channels.SocketChannel,TcpNioConnection> |
getConnections() |
protected java.nio.channels.ServerSocketChannel |
getServerChannel() |
protected boolean |
isUsingDirectBuffers() |
void |
run()
If no listener registers, exits.
|
void |
setTcpNioConnectionSupport(TcpNioConnectionSupport tcpNioSupport) |
void |
setUsingDirectBuffers(boolean usingDirectBuffers) |
afterShutdown, beforeShutdown, getBacklog, getConnection, getLocalAddress, initializeConnection, isListening, isShuttingDown, postProcessServerSocket, setBacklog, setListening, setLocalAddress, startaddConnection, checkActive, closeConnection, 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, wrapConnectionafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toStringpublic TcpNioServerConnectionFactory(int port)
port - The port.public void run()
AbstractServerConnectionFactory.initializeConnection(TcpConnectionSupport, Socket) and executes the
connection Runnable.run() using the task executor.
I/O errors on the server socket/channel are logged and the factory is stopped.protected void doAccept(java.nio.channels.Selector selector,
java.nio.channels.ServerSocketChannel server,
long now)
throws java.io.IOException
doAccept in class AbstractConnectionFactoryselector - server - now - java.io.IOExceptionjava.net.SocketExceptionjava.nio.channels.ClosedChannelExceptionpublic void close()
AbstractConnectionFactoryclose in class AbstractConnectionFactorypublic void setUsingDirectBuffers(boolean usingDirectBuffers)
public void setTcpNioConnectionSupport(TcpNioConnectionSupport tcpNioSupport)
protected java.nio.channels.ServerSocketChannel getServerChannel()
protected boolean isUsingDirectBuffers()
protected java.util.Map<java.nio.channels.SocketChannel,TcpNioConnection> getConnections()