|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory org.springframework.integration.ip.tcp.connection.TcpNetServerConnectionFactory
public class TcpNetServerConnectionFactory
Implements a server connection factory that produces TcpNetConnection
s using
a ServerSocket
. Must have a TcpListener
registered.
Field Summary | |
---|---|
protected java.net.ServerSocket |
serverSocket
|
Fields inherited from class org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory |
---|
listening, localAddress |
Fields inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory |
---|
active, DEFAULT_REPLY_TIMEOUT, deserializer, host, interceptorFactoryChain, lifecycleMonitor, listener, logger, mapper, poolSize, port, sender, serializer, singleUse, soTimeout |
Constructor Summary | |
---|---|
TcpNetServerConnectionFactory(int port)
Listens for incoming connections on the port. |
Method Summary | |
---|---|
void |
close()
Closes the server. |
boolean |
isRunning()
|
void |
run()
If no listener registers, exits. |
Methods inherited from class org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory |
---|
getConnection, getLocalAddress, initializeConnection, isListening, setLocalAddress |
Methods inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory |
---|
addConnection, doAccept, getHost, getPhase, getPort, getSoLinger, getSoReceiveBufferSize, getSoSendBufferSize, getSoTimeout, getSoTrafficClass, getTaskExecutor, harvestClosedConnections, isAutoStartup, isLookupHost, isSingleUse, isSoKeepAlive, isSoTcpNoDelay, processNioSelections, registerListener, registerSender, setDeserializer, setInterceptorFactoryChain, setLookupHost, setMapper, setPoolSize, setSerializer, setSingleUse, setSocketAttributes, setSoKeepAlive, setSoLinger, setSoReceiveBufferSize, setSoSendBufferSize, setSoTcpNoDelay, setSoTimeout, setSoTrafficClass, setTaskExecutor, start, stop, stop, wrapConnection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.net.ServerSocket serverSocket
Constructor Detail |
---|
public TcpNetServerConnectionFactory(int port)
port
- The port.Method Detail |
---|
public void run()
AbstractServerConnectionFactory.initializeConnection(TcpConnection, 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.
public boolean isRunning()
public void close()
AbstractConnectionFactory
close
in class AbstractConnectionFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |