|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.integration.ip.tcp.connection.AbstractConnectionFactory
public abstract class AbstractConnectionFactory
Base class for all connection factories.
Field Summary | |
---|---|
protected boolean |
active
|
protected static int |
DEFAULT_REPLY_TIMEOUT
|
protected String |
host
|
protected org.springframework.commons.serializer.InputStreamingConverter<?> |
inputConverter
|
protected TcpConnectionInterceptorFactoryChain |
interceptorFactoryChain
|
protected TcpListener |
listener
|
protected org.apache.commons.logging.Log |
logger
|
protected TcpMessageMapper |
mapper
|
protected org.springframework.commons.serializer.OutputStreamingConverter<?> |
outputConverter
|
protected int |
poolSize
|
protected int |
port
|
protected TcpSender |
sender
|
protected boolean |
singleUse
|
protected int |
soTimeout
|
protected Executor |
taskExecutor
|
Constructor Summary | |
---|---|
AbstractConnectionFactory()
|
Method Summary | |
---|---|
abstract void |
close()
Closes the server. |
String |
getHost()
|
int |
getPhase()
|
int |
getPort()
|
int |
getSoLinger()
|
int |
getSoReceiveBufferSize()
|
int |
getSoSendBufferSize()
|
int |
getSoTimeout()
|
int |
getSoTrafficClass()
|
boolean |
isAutoStartup()
|
boolean |
isSingleUse()
|
boolean |
isSoKeepAlive()
|
boolean |
isSoTcpNoDelay()
|
void |
registerListener(TcpListener listener)
Registers a TcpListener to receive messages after the payload has been converted from the input data. |
void |
registerSender(TcpSender sender)
Registers a TcpSender; for server sockets, used to provide connection information so a sender can be used to reply to incoming messages. |
void |
setInputConverter(org.springframework.commons.serializer.InputStreamingConverter<?> converter)
|
void |
setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain)
|
void |
setMapper(TcpMessageMapper mapper)
|
void |
setOutputConverter(org.springframework.commons.serializer.OutputStreamingConverter<?> outputConverter)
|
void |
setPoolSize(int poolSize)
|
void |
setSingleUse(boolean singleUse)
If true, sockets created by this factory will be used once. |
protected void |
setSocketAttributes(Socket socket)
Sets socket attributes on the socket. |
void |
setSoKeepAlive(boolean soKeepAlive)
|
void |
setSoLinger(int soLinger)
|
void |
setSoReceiveBufferSize(int soReceiveBufferSize)
|
void |
setSoSendBufferSize(int soSendBufferSize)
|
void |
setSoTcpNoDelay(boolean soTcpNoDelay)
|
void |
setSoTimeout(int soTimeout)
|
void |
setSoTrafficClass(int soTrafficClass)
|
void |
setTaskExecutor(Executor taskExecutor)
|
void |
start()
Creates a taskExecutor (if one was not provided) and starts the listening process on one of its threads. |
void |
stop()
Stops the server. |
void |
stop(Runnable callback)
|
protected TcpConnection |
wrapConnection(TcpConnection connection)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.integration.ip.tcp.connection.ConnectionFactory |
---|
getConnection |
Methods inherited from interface java.lang.Runnable |
---|
run |
Methods inherited from interface org.springframework.context.Lifecycle |
---|
isRunning |
Field Detail |
---|
protected org.apache.commons.logging.Log logger
protected static final int DEFAULT_REPLY_TIMEOUT
protected String host
protected int port
protected TcpListener listener
protected TcpSender sender
protected int soTimeout
protected Executor taskExecutor
protected org.springframework.commons.serializer.InputStreamingConverter<?> inputConverter
protected org.springframework.commons.serializer.OutputStreamingConverter<?> outputConverter
protected TcpMessageMapper mapper
protected boolean singleUse
protected int poolSize
protected boolean active
protected TcpConnectionInterceptorFactoryChain interceptorFactoryChain
Constructor Detail |
---|
public AbstractConnectionFactory()
Method Detail |
---|
protected void setSocketAttributes(Socket socket) throws SocketException
socket
- The socket.
SocketException
public int getSoTimeout()
public void setSoTimeout(int soTimeout)
soTimeout
- the soTimeout to setpublic int getSoReceiveBufferSize()
public void setSoReceiveBufferSize(int soReceiveBufferSize)
soReceiveBufferSize
- the soReceiveBufferSize to setpublic int getSoSendBufferSize()
public void setSoSendBufferSize(int soSendBufferSize)
soSendBufferSize
- the soSendBufferSize to setpublic boolean isSoTcpNoDelay()
public void setSoTcpNoDelay(boolean soTcpNoDelay)
soTcpNoDelay
- the soTcpNoDelay to setpublic int getSoLinger()
public void setSoLinger(int soLinger)
soLinger
- the soLinger to setpublic boolean isSoKeepAlive()
public void setSoKeepAlive(boolean soKeepAlive)
soKeepAlive
- the soKeepAlive to setpublic int getSoTrafficClass()
public void setSoTrafficClass(int soTrafficClass)
soTrafficClass
- the soTrafficClass to setpublic String getHost()
public int getPort()
public void registerListener(TcpListener listener)
listener
- the TcpListener.public void registerSender(TcpSender sender)
sender
- The senderpublic void setTaskExecutor(Executor taskExecutor)
taskExecutor
- the taskExecutor to setpublic void setInputConverter(org.springframework.commons.serializer.InputStreamingConverter<?> converter)
converter
- the inputConverter to setpublic void setOutputConverter(org.springframework.commons.serializer.OutputStreamingConverter<?> outputConverter)
outputConverter
- the outputConverter to setpublic void setMapper(TcpMessageMapper mapper)
mapper
- the mapper to set; defaults to a TcpMessageMapper
public boolean isSingleUse()
public void setSingleUse(boolean singleUse)
singleUse
- public void setPoolSize(int poolSize)
public void setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain)
public abstract void close()
public void start()
start
in interface Lifecycle
public void stop()
stop
in interface Lifecycle
protected TcpConnection wrapConnection(TcpConnection connection) throws Exception
Exception
public int getPhase()
getPhase
in interface Phased
public boolean isAutoStartup()
isAutoStartup
in interface SmartLifecycle
public void stop(Runnable callback)
stop
in interface SmartLifecycle
|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |