|
|||||||||
| 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.endpoint.AbstractEndpoint
org.springframework.integration.gateway.AbstractMessagingGateway
public abstract class AbstractMessagingGateway
A convenient base class for connecting application code to
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.
| Field Summary |
|---|
| Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
AbstractMessagingGateway()
|
|
| Method Summary | |
|---|---|
protected void |
doStart()
Subclasses must implement this method with the start behavior. |
protected void |
doStop()
Subclasses must implement this method with the stop behavior. |
protected abstract java.lang.Object |
fromMessage(Message<?> message)
Subclasses must implement this to map from a Message to an Object. |
java.lang.Object |
receive()
|
void |
send(java.lang.Object object)
|
java.lang.Object |
sendAndReceive(java.lang.Object object)
|
Message<?> |
sendAndReceiveMessage(java.lang.Object object)
|
void |
setReplyChannel(MessageChannel replyChannel)
Set the reply channel. |
void |
setReplyTimeout(long replyTimeout)
Set the timeout value for receiving reply messages. |
void |
setRequestChannel(MessageChannel requestChannel)
Set the request channel. |
void |
setRequestTimeout(long requestTimeout)
Set the timeout value for sending request messages. |
void |
setShouldThrowErrors(boolean shouldThrowErrors)
Specify whether the Throwable payload of a received ErrorMessage
should be extracted and thrown from a send-and-receive operation. |
protected abstract Message<?> |
toMessage(java.lang.Object object)
Subclasses must implement this to map from an Object to a Message. |
| Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint |
|---|
afterPropertiesSet, isRunning, onInit, setAutoStartup, setTaskScheduler, start, stop |
| Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
getBeanFactory, getChannelResolver, getTaskScheduler, setBeanFactory, setBeanName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractMessagingGateway()
| Method Detail |
|---|
public void setRequestChannel(MessageChannel requestChannel)
requestChannel - the channel to which request messages will be sentpublic void setReplyChannel(MessageChannel replyChannel)
replyChannel - the channel from which reply messages will be receivedpublic void setRequestTimeout(long requestTimeout)
requestTimeout - the timeout value in millisecondspublic void setReplyTimeout(long replyTimeout)
replyTimeout - the timeout value in millisecondspublic void setShouldThrowErrors(boolean shouldThrowErrors)
ErrorMessage
should be extracted and thrown from a send-and-receive operation.
Otherwise, the ErrorMessage would be returned just like any other
reply Message. The default is true.
public void send(java.lang.Object object)
send in interface MessagingGatewaypublic java.lang.Object receive()
receive in interface MessagingGatewaypublic java.lang.Object sendAndReceive(java.lang.Object object)
sendAndReceive in interface MessagingGatewaypublic Message<?> sendAndReceiveMessage(java.lang.Object object)
sendAndReceiveMessage in interface MessagingGatewayprotected void doStart()
AbstractEndpointAbstractEndpoint.lifecycleLock.
doStart in class AbstractEndpointprotected void doStop()
AbstractEndpointAbstractEndpoint.lifecycleLock.
doStop in class AbstractEndpointprotected abstract Message<?> toMessage(java.lang.Object object)
protected abstract java.lang.Object fromMessage(Message<?> message)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||