public interface DestinationResolvingMessageRequestReplyOperations<D> extends MessageRequestReplyOperations<D>
MessageRequestReplyOperations
and adds operations for sending and
receiving messages to and from a destination specified as a (resolvable) String name.DestinationResolver
Modifier and Type | Method and Description |
---|---|
<T> T |
convertSendAndReceive(java.lang.String destinationName,
java.lang.Object request,
java.lang.Class<T> targetClass)
Resolve the given destination name, convert the payload request Object
to serialized form, possibly using a
MessageConverter ,
wrap it as a message and send it to the resolved destination, receive a reply
and convert its body to the specified target class. |
<T> T |
convertSendAndReceive(java.lang.String destinationName,
java.lang.Object request,
java.lang.Class<T> targetClass,
MessagePostProcessor requestPostProcessor)
Resolve the given destination name, convert the payload request Object
to serialized form, possibly using a
MessageConverter ,
wrap it as a message, apply the given post process, and send the resulting
message to the resolved destination, then receive a reply and convert its
body to the specified target class. |
<T> T |
convertSendAndReceive(java.lang.String destinationName,
java.lang.Object request,
java.util.Map<java.lang.String,java.lang.Object> headers,
java.lang.Class<T> targetClass)
Resolve the given destination name, convert the payload request Object
to serialized form, possibly using a
MessageConverter ,
wrap it as a message with the given headers and send it to the resolved destination,
receive a reply and convert its body to the specified target class. |
<T> T |
convertSendAndReceive(java.lang.String destinationName,
java.lang.Object request,
java.util.Map<java.lang.String,java.lang.Object> headers,
java.lang.Class<T> targetClass,
MessagePostProcessor requestPostProcessor)
Resolve the given destination name, convert the payload request Object
to serialized form, possibly using a
MessageConverter ,
wrap it as a message with the given headers, apply the given post process,
and send the resulting message to the resolved destination, then receive
a reply and convert its body to the specified target class. |
Message<?> |
sendAndReceive(java.lang.String destinationName,
Message<?> requestMessage)
Resolve the given destination name to a destination and send the given message,
receive a reply and return it.
|
convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, sendAndReceive, sendAndReceive
@Nullable Message<?> sendAndReceive(java.lang.String destinationName, Message<?> requestMessage) throws MessagingException
destinationName
- the name of the target destinationrequestMessage
- the mesage to sendnull
if the message could not
be received, for example due to a timeoutMessagingException
@Nullable <T> T convertSendAndReceive(java.lang.String destinationName, java.lang.Object request, java.lang.Class<T> targetClass) throws MessagingException
MessageConverter
,
wrap it as a message and send it to the resolved destination, receive a reply
and convert its body to the specified target class.destinationName
- the name of the target destinationrequest
- the payload for the request message to sendtargetClass
- the target class to convert the payload of the reply tonull
if
the message could not be received, for example due to a timeoutMessagingException
@Nullable <T> T convertSendAndReceive(java.lang.String destinationName, java.lang.Object request, @Nullable java.util.Map<java.lang.String,java.lang.Object> headers, java.lang.Class<T> targetClass) throws MessagingException
MessageConverter
,
wrap it as a message with the given headers and send it to the resolved destination,
receive a reply and convert its body to the specified target class.destinationName
- the name of the target destinationrequest
- the payload for the request message to sendheaders
- the headers for the request message to sendtargetClass
- the target class to convert the payload of the reply tonull
if
the message could not be received, for example due to a timeoutMessagingException
@Nullable <T> T convertSendAndReceive(java.lang.String destinationName, java.lang.Object request, java.lang.Class<T> targetClass, @Nullable MessagePostProcessor requestPostProcessor) throws MessagingException
MessageConverter
,
wrap it as a message, apply the given post process, and send the resulting
message to the resolved destination, then receive a reply and convert its
body to the specified target class.destinationName
- the name of the target destinationrequest
- the payload for the request message to sendtargetClass
- the target class to convert the payload of the reply torequestPostProcessor
- post process for the request messagenull
if
the message could not be received, for example due to a timeoutMessagingException
@Nullable <T> T convertSendAndReceive(java.lang.String destinationName, java.lang.Object request, @Nullable java.util.Map<java.lang.String,java.lang.Object> headers, java.lang.Class<T> targetClass, @Nullable MessagePostProcessor requestPostProcessor) throws MessagingException
MessageConverter
,
wrap it as a message with the given headers, apply the given post process,
and send the resulting message to the resolved destination, then receive
a reply and convert its body to the specified target class.destinationName
- the name of the target destinationrequest
- the payload for the request message to sendheaders
- the headers for the request message to sendtargetClass
- the target class to convert the payload of the reply torequestPostProcessor
- post process for the request messagenull
if
the message could not be received, for example due to a timeoutMessagingException