|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.context.IntegrationObjectSupport org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory
public abstract class AbstractServerConnectionFactory
Base class for all server connection factories. Server connection factories listen on a port for incoming connections and create new TcpConnection objects for each new connection.
Field Summary |
---|
Fields inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory |
---|
DEFAULT_REPLY_TIMEOUT, lifecycleMonitor |
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
AbstractServerConnectionFactory(int port)
The port on which the factory will listen. |
Method Summary | |
---|---|
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. |
java.lang.String |
getLocalAddress()
|
protected void |
initializeConnection(TcpConnection connection,
java.net.Socket socket)
Transfers attributes such as (de)serializer, singleUse etc to a new connection. |
boolean |
isListening()
|
protected void |
postProcessServerSocket(java.net.ServerSocket serverSocket)
|
void |
setBacklog(int backlog)
The number of sockets in the connection backlog. |
protected void |
setListening(boolean listening)
|
void |
setLocalAddress(java.lang.String localAddress)
Used on multi-homed systems to enforce the server to listen on a specfic network address instead of all network adapters. |
void |
setPoolSize(int poolSize)
Deprecated. Default task executor is now a cached rather than a fixed pool executor. Use setBacklog(int) to set the connection backlog. |
Methods inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory |
---|
addConnection, checkActive, close, doAccept, getDeserializer, getHost, getListener, getMapper, getPhase, getPoolSize, getPort, getSender, getSerializer, getSoLinger, getSoReceiveBufferSize, getSoSendBufferSize, getSoTimeout, getSoTrafficClass, getTaskExecutor, getTcpSocketSupport, harvestClosedConnections, isActive, isAutoStartup, isLookupHost, isRunning, isSingleUse, isSoKeepAlive, isSoTcpNoDelay, processNioSelections, registerListener, registerSender, setActive, setDeserializer, setInterceptorFactoryChain, setLookupHost, setMapper, setNioHarvestInterval, setSerializer, setSingleUse, setSocketAttributes, setSoKeepAlive, setSoLinger, setSoReceiveBufferSize, setSoSendBufferSize, setSoTcpNoDelay, setSoTimeout, setSoTrafficClass, setTaskExecutor, setTcpSocketSupport, start, stop, stop, wrapConnection |
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
---|
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
---|
run |
Constructor Detail |
---|
public AbstractServerConnectionFactory(int port)
port
- Method Detail |
---|
public TcpConnection getConnection() throws java.lang.Exception
java.lang.Exception
protected void setListening(boolean listening)
listening
- the listening to setpublic boolean isListening()
protected void initializeConnection(TcpConnection connection, java.net.Socket socket)
connection
- The new connection.socket
- The new socket.protected void postProcessServerSocket(java.net.ServerSocket serverSocket)
public java.lang.String getLocalAddress()
public void setLocalAddress(java.lang.String localAddress)
localAddress
- the ip address of the required adapter.public int getBacklog()
public void setBacklog(int backlog)
backlog
- @Deprecated public void setPoolSize(int poolSize)
setBacklog(int)
to set the connection backlog.
setPoolSize
in class AbstractConnectionFactory
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |