public abstract class AbstractServerConnectionFactory extends AbstractConnectionFactory implements SchedulingAwareRunnable, OrderlyShutdownCapable
DEFAULT_REPLY_TIMEOUT, lifecycleMonitorlogger| Constructor and Description |
|---|
AbstractServerConnectionFactory(int port)
The port on which the factory will listen.
|
| Modifier and Type | Method and Description |
|---|---|
int |
afterShutdown()
Called after normal shutdown of schedulers, executors etc,
and after the shutdown delay has elapsed, but before any
forced shutdown of any remaining active scheduler/executor
threads.Can optionally return the number of active messages
still in process.
|
int |
beforeShutdown()
Called before shutdown begins.
|
int |
getBacklog()
The number of sockets in the server connection backlog.
|
TcpConnection |
getConnection()
Not supported because the factory manages multiple connections and this
method cannot discriminate.
|
String |
getLocalAddress() |
protected void |
initializeConnection(TcpConnectionSupport connection,
Socket socket)
Transfers attributes such as (de)serializer, mapper etc to a new connection.
|
boolean |
isListening() |
boolean |
isLongLived() |
protected boolean |
isShuttingDown() |
protected void |
postProcessServerSocket(ServerSocket serverSocket) |
protected void |
publishServerExceptionEvent(Exception e) |
void |
setBacklog(int backlog)
The number of sockets in the connection backlog.
|
protected void |
setListening(boolean listening) |
void |
setLocalAddress(String localAddress)
Used on multi-homed systems to enforce the server to listen
on a specfic network address instead of all network adapters.
|
void |
start() |
addConnection, checkActive, 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, stop, wrapConnectionafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toStringpublic AbstractServerConnectionFactory(int port)
port - The port.public boolean isLongLived()
isLongLived in interface SchedulingAwareRunnablepublic void start()
start in interface Lifecyclestart in class AbstractConnectionFactorypublic TcpConnection getConnection() throws Exception
getConnection in interface ConnectionFactoryExceptionprotected void setListening(boolean listening)
listening - the listening to setpublic boolean isListening()
protected boolean isShuttingDown()
protected void initializeConnection(TcpConnectionSupport connection, Socket socket)
connection - The new connection.socket - The new socket.protected void postProcessServerSocket(ServerSocket serverSocket)
public String getLocalAddress()
public void setLocalAddress(String localAddress)
localAddress - the ip address of the required adapter.public int getBacklog()
public void setBacklog(int backlog)
backlog - The backlog to set.public int beforeShutdown()
OrderlyShutdownCapablebeforeShutdown in interface OrderlyShutdownCapablepublic int afterShutdown()
OrderlyShutdownCapableafterShutdown in interface OrderlyShutdownCapableprotected void publishServerExceptionEvent(Exception e)