|
Spring Integration | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.AbstractReplyProducingMessageHandler
org.springframework.integration.ip.tcp.TcpOutboundGateway
public class TcpOutboundGateway
TCP outbound gateway that uses a client connection factory. If the factory is configured for single-use connections, each request is sent on a new connection; if the factory does not use single use connections, each request is blocked until the previous response is received (or times out). Asynchronous requests/responses over the same connection are not supported - use a pair of outbound/inbound adapters for that use case.
SmartLifecycle methods delegate to the underlying AbstractConnectionFactory
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler |
|---|
AbstractReplyProducingMessageHandler.RequestHandler |
| Field Summary |
|---|
| Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
logger |
| Fields inherited from interface org.springframework.core.Ordered |
|---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
| Constructor Summary | |
|---|---|
TcpOutboundGateway()
|
|
| Method Summary | |
|---|---|
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()
Subclasses may implement this method to provide component type information. |
protected AbstractConnectionFactory |
getConnectionFactory()
|
int |
getPhase()
|
protected java.lang.Object |
handleRequestMessage(Message<?> requestMessage)
Subclasses must implement this method to handle the request Message. |
boolean |
isAutoStartup()
|
boolean |
isRunning()
|
boolean |
onMessage(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(MessageChannel replyChannel)
Specify the Spring Integration reply channel. |
void |
setRequestTimeout(long requestTimeout)
|
void |
setSendTimeout(long sendTimeout)
Set the timeout for sending reply Messages. |
void |
start()
|
void |
stop()
|
void |
stop(java.lang.Runnable callback)
|
| Methods inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler |
|---|
doInvokeAdvisedRequestHandler, getMessagingTemplate, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setChannelResolver, setOutputChannel, setRequiresReply, shouldCopyRequestHeaders |
| Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler |
|---|
getOrder, handleMessage, setOrder, setShouldTrack |
| Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setApplicationContext, 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 org.springframework.integration.context.NamedComponent |
|---|
getComponentName |
| Constructor Detail |
|---|
public TcpOutboundGateway()
| Method Detail |
|---|
public void setRequestTimeout(long requestTimeout)
requestTimeout - the requestTimeout to setpublic void setRemoteTimeout(long remoteTimeout)
remoteTimeout - the remoteTimeout to setpublic void setSendTimeout(long sendTimeout)
AbstractReplyProducingMessageHandler
setSendTimeout in class AbstractReplyProducingMessageHandlerprotected java.lang.Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandler
handleRequestMessage in class AbstractReplyProducingMessageHandlerpublic boolean onMessage(Message<?> message)
TcpListener
onMessage in interface TcpListenermessage - The message.
public void setConnectionFactory(AbstractConnectionFactory connectionFactory)
public void addNewConnection(TcpConnection connection)
TcpSenderTcpListener, this
method is called each time a new connection is made.
addNewConnection in interface TcpSenderconnection - The connection.public void removeDeadConnection(TcpConnection connection)
TcpSenderTcpListener, this
method is called each time a connection is closed.
removeDeadConnection in interface TcpSenderconnection - The connection.public void setReplyChannel(MessageChannel replyChannel)
public java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType in interface NamedComponentgetComponentType in class AbstractMessageHandlerpublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic void stop(java.lang.Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic void setAutoStartup(boolean autoStartup)
public void setPhase(int phase)
protected AbstractConnectionFactory getConnectionFactory()
|
Spring Integration | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||