public abstract class MessagingGatewaySupport extends AbstractEndpoint implements TrackableComponent
MessageChannels for sending, receiving, or request-reply operations.
Exposes setters for configuring request and reply MessageChannels as
well as the timeout values for sending and receiving Messages.lifecycleCondition, lifecycleLocklogger| Constructor and Description |
|---|
MessagingGatewaySupport() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Subclasses must implement this method with the start behavior.
|
protected void |
doStop()
Subclasses must implement this method with the stop behavior.
|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
protected java.lang.Object |
receive() |
protected void |
send(java.lang.Object object) |
protected java.lang.Object |
sendAndReceive(java.lang.Object object) |
protected org.springframework.messaging.Message<?> |
sendAndReceiveMessage(java.lang.Object object) |
void |
setErrorChannel(org.springframework.messaging.MessageChannel errorChannel)
Set the error channel.
|
void |
setReplyChannel(org.springframework.messaging.MessageChannel replyChannel)
Set the reply channel.
|
void |
setReplyMapper(OutboundMessageMapper<?> replyMapper)
Provide an
OutboundMessageMapper for mapping to objects from
any reply Messages received in receive or sendAndReceive operations. |
void |
setReplyTimeout(long replyTimeout)
Set the timeout value for receiving reply messages.
|
void |
setRequestChannel(org.springframework.messaging.MessageChannel requestChannel)
Set the request channel.
|
void |
setRequestMapper(InboundMessageMapper<?> requestMapper)
Provide an
InboundMessageMapper for creating request Messages
from any object passed in a send or sendAndReceive operation. |
void |
setRequestTimeout(long requestTimeout)
Set the timeout value for sending request messages.
|
void |
setShouldTrack(boolean shouldTrack)
Specify whether this gateway should be tracked in the Message History
of Messages that originate from its send or sendAndReceive operations.
|
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stopafterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic void setRequestChannel(org.springframework.messaging.MessageChannel requestChannel)
requestChannel - the channel to which request messages will be sentpublic void setReplyChannel(org.springframework.messaging.MessageChannel replyChannel)
replyChannel - the channel from which reply messages will be receivedpublic void setErrorChannel(org.springframework.messaging.MessageChannel errorChannel)
errorChannel - The error channel.public void setRequestTimeout(long requestTimeout)
requestTimeout - the timeout value in millisecondspublic void setReplyTimeout(long replyTimeout)
replyTimeout - the timeout value in millisecondspublic void setRequestMapper(InboundMessageMapper<?> requestMapper)
InboundMessageMapper for creating request Messages
from any object passed in a send or sendAndReceive operation.requestMapper - The request mapper.public void setReplyMapper(OutboundMessageMapper<?> replyMapper)
OutboundMessageMapper for mapping to objects from
any reply Messages received in receive or sendAndReceive operations.replyMapper - The reply mapper.public void setShouldTrack(boolean shouldTrack)
setShouldTrack in interface TrackableComponentpublic java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportprotected void onInit()
throws java.lang.Exception
IntegrationObjectSupportonInit in class IntegrationObjectSupportjava.lang.Exception - Any exception.protected void send(java.lang.Object object)
protected java.lang.Object receive()
protected java.lang.Object sendAndReceive(java.lang.Object object)
protected org.springframework.messaging.Message<?> sendAndReceiveMessage(java.lang.Object object)
protected void doStart()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStart in class AbstractEndpointprotected void doStop()
AbstractEndpointAbstractEndpoint.lifecycleLock.doStop in class AbstractEndpoint