public class TcpOutboundGateway extends org.springframework.integration.handler.AbstractReplyProducingMessageHandler implements TcpSender, TcpListener, org.springframework.context.SmartLifecycle
SmartLifecycle
methods delegate to the underlying AbstractConnectionFactory
Constructor and Description |
---|
TcpOutboundGateway() |
Modifier and Type | Method and Description |
---|---|
void |
addNewConnection(TcpConnection connection)
When we are using sockets owned by a
TcpListener , this
method is called each time a new connection is made. |
java.lang.String |
getComponentType() |
protected AbstractConnectionFactory |
getConnectionFactory() |
int |
getPhase() |
protected java.lang.Object |
handleRequestMessage(org.springframework.messaging.Message<?> requestMessage) |
boolean |
isAutoStartup() |
boolean |
isRunning() |
boolean |
onMessage(org.springframework.messaging.Message<?> message)
Called by a TCPConnection when a new message arrives.
|
void |
removeDeadConnection(TcpConnection connection)
When we are using sockets owned by a
TcpListener , this
method is called each time a connection is closed. |
void |
setAutoStartup(boolean autoStartup) |
void |
setConnectionFactory(AbstractConnectionFactory connectionFactory) |
void |
setPhase(int phase) |
void |
setRemoteTimeout(long remoteTimeout) |
void |
setReplyChannel(org.springframework.messaging.MessageChannel replyChannel)
Specify the Spring Integration reply channel.
|
void |
setRequestTimeout(long requestTimeout) |
void |
setSendTimeout(long sendTimeout) |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
doInit, doInvokeAdvisedRequestHandler, handleMessageInternal, hasAdviceChain, onInit, produceReply, setAdviceChain, setBeanClassLoader, setChannelResolver, setRequiresReply, shouldCopyRequestHeaders
getOutputChannel, setOutputChannel, setOutputChannelName
getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
public void setRequestTimeout(long requestTimeout)
requestTimeout
- the requestTimeout to setpublic void setRemoteTimeout(long remoteTimeout)
remoteTimeout
- the remoteTimeout to setpublic void setSendTimeout(long sendTimeout)
setSendTimeout
in class org.springframework.integration.handler.AbstractMessageProducingHandler
protected java.lang.Object handleRequestMessage(org.springframework.messaging.Message<?> requestMessage)
handleRequestMessage
in class org.springframework.integration.handler.AbstractReplyProducingMessageHandler
public boolean onMessage(org.springframework.messaging.Message<?> message)
TcpListener
onMessage
in interface TcpListener
message
- The message.public void setConnectionFactory(AbstractConnectionFactory connectionFactory)
public void addNewConnection(TcpConnection connection)
TcpSender
TcpListener
, this
method is called each time a new connection is made.addNewConnection
in interface TcpSender
connection
- The connection.public void removeDeadConnection(TcpConnection connection)
TcpSender
TcpListener
, this
method is called each time a connection is closed.removeDeadConnection
in interface TcpSender
connection
- The connection.public void setReplyChannel(org.springframework.messaging.MessageChannel replyChannel)
replyChannel
- The reply channel.public java.lang.String getComponentType()
getComponentType
in interface org.springframework.integration.support.context.NamedComponent
getComponentType
in class org.springframework.integration.handler.AbstractMessageHandler
public void start()
start
in interface org.springframework.context.Lifecycle
public void stop()
stop
in interface org.springframework.context.Lifecycle
public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
public int getPhase()
getPhase
in interface org.springframework.context.Phased
public boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public void stop(java.lang.Runnable callback)
stop
in interface org.springframework.context.SmartLifecycle
public void setAutoStartup(boolean autoStartup)
public void setPhase(int phase)
protected AbstractConnectionFactory getConnectionFactory()