Top Description Methods
org.springframework.messaging.core

public Interface DestinationResolvingMessageRequestReplyOperations<D>

extends MessageRequestReplyOperations<D>
Known Direct Implementers
org.springframework.messaging.core.AbstractDestinationResolvingMessagingTemplate
Type Parameters
<D>
the destination type
Imports
java.util.Map, org.springframework.lang.Nullable, org.springframework.messaging.Message, .MessagingException

Extends MessageRequestReplyOperations and adds operations for sending and receiving messages to and from a destination specified as a (resolvable) String name.
Authors
Mark Fisher, Rossen Stoyanchev
Since
4.0
See Also
DestinationResolver

Method Summary

Modifier and TypeMethod and Description
public <T> T

Returns:

the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout
convertSendAndReceive
(String
the name of the target destination
destinationName
,
Object
the payload for the request message to send
request
,
Class<T>
the target class to convert the payload of the reply to
targetClass
)

Redeclares org.springframework.messaging.core.MessageRequestReplyOperations.convertSendAndReceive.

Resolve the given destination name, convert the payload request Object to serialized form, possibly using a org.springframework.messaging.converter.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.

public <T> T

Returns:

the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout
convertSendAndReceive
(String
the name of the target destination
destinationName
,
Object
the payload for the request message to send
request
,
Map<String, Object>
the headers for the request message to send
headers
,
Class<T>
the target class to convert the payload of the reply to
targetClass
)

Redeclares org.springframework.messaging.core.MessageRequestReplyOperations.convertSendAndReceive.

Resolve the given destination name, convert the payload request Object to serialized form, possibly using a org.springframework.messaging.converter.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.

public <T> T

Returns:

the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout
convertSendAndReceive
(String
the name of the target destination
destinationName
,
Object
the payload for the request message to send
request
,
Class<T>
the target class to convert the payload of the reply to
targetClass
,
MessagePostProcessor
post process for the request message
requestPostProcessor
)

Redeclares org.springframework.messaging.core.MessageRequestReplyOperations.convertSendAndReceive.

Resolve the given destination name, convert the payload request Object to serialized form, possibly using a org.springframework.messaging.converter.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.

public <T> T

Returns:

the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout
convertSendAndReceive
(String
the name of the target destination
destinationName
,
Object
the payload for the request message to send
request
,
Map<String, Object>
the headers for the request message to send
headers
,
Class<T>
the target class to convert the payload of the reply to
targetClass
,
MessagePostProcessor
post process for the request message
requestPostProcessor
)

Redeclares org.springframework.messaging.core.MessageRequestReplyOperations.convertSendAndReceive.

Resolve the given destination name, convert the payload request Object to serialized form, possibly using a org.springframework.messaging.converter.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.

public Message<?>

Returns:

the received message, possibly null if the message could not be received, for example due to a timeout
sendAndReceive
(String
the name of the target destination
destinationName
,
Message<?>
the message to send
requestMessage
)

Redeclares org.springframework.messaging.core.MessageRequestReplyOperations.sendAndReceive.

Resolve the given destination name to a destination and send the given message, receive a reply and return it.

Inherited from org.springframework.messaging.core.MessageRequestReplyOperations:
convertSendAndReceiveconvertSendAndReceivesendAndReceive

Method Detail

convertSendAndReceiveback to summary
public <T> T convertSendAndReceive(String destinationName, Object request, Class<T> targetClass) throws MessagingException

Redeclares org.springframework.messaging.core.MessageRequestReplyOperations.convertSendAndReceive.

Resolve the given destination name, convert the payload request Object to serialized form, possibly using a org.springframework.messaging.converter.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.

Parameters
destinationName:String

the name of the target destination

request:Object

the payload for the request message to send

targetClass:Class<T>

the target class to convert the payload of the reply to

Returns:T

the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout

Annotations
@Nullable
convertSendAndReceiveback to summary
public <T> T convertSendAndReceive(String destinationName, Object request, Map<String, Object> headers, Class<T> targetClass) throws MessagingException

Redeclares org.springframework.messaging.core.MessageRequestReplyOperations.convertSendAndReceive.

Resolve the given destination name, convert the payload request Object to serialized form, possibly using a org.springframework.messaging.converter.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.

Parameters
destinationName:String

the name of the target destination

request:Object

the payload for the request message to send

headers:Map<String, Object>

the headers for the request message to send

targetClass:Class<T>

the target class to convert the payload of the reply to

Returns:T

the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout

Annotations
@Nullable
convertSendAndReceiveback to summary
public <T> T convertSendAndReceive(String destinationName, Object request, Class<T> targetClass, MessagePostProcessor requestPostProcessor) throws MessagingException

Redeclares org.springframework.messaging.core.MessageRequestReplyOperations.convertSendAndReceive.

Resolve the given destination name, convert the payload request Object to serialized form, possibly using a org.springframework.messaging.converter.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.

Parameters
destinationName:String

the name of the target destination

request:Object

the payload for the request message to send

targetClass:Class<T>

the target class to convert the payload of the reply to

requestPostProcessor:MessagePostProcessor

post process for the request message

Returns:T

the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout

Annotations
@Nullable
convertSendAndReceiveback to summary
public <T> T convertSendAndReceive(String destinationName, Object request, Map<String, Object> headers, Class<T> targetClass, MessagePostProcessor requestPostProcessor) throws MessagingException

Redeclares org.springframework.messaging.core.MessageRequestReplyOperations.convertSendAndReceive.

Resolve the given destination name, convert the payload request Object to serialized form, possibly using a org.springframework.messaging.converter.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.

Parameters
destinationName:String

the name of the target destination

request:Object

the payload for the request message to send

headers:Map<String, Object>

the headers for the request message to send

targetClass:Class<T>

the target class to convert the payload of the reply to

requestPostProcessor:MessagePostProcessor

post process for the request message

Returns:T

the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout

Annotations
@Nullable
sendAndReceiveback to summary
public Message<?> sendAndReceive(String destinationName, Message<?> requestMessage) throws MessagingException

Redeclares org.springframework.messaging.core.MessageRequestReplyOperations.sendAndReceive.

Resolve the given destination name to a destination and send the given message, receive a reply and return it.

Parameters
destinationName:String

the name of the target destination

requestMessage:Message<?>

the message to send

Returns:Message<?>

the received message, possibly null if the message could not be received, for example due to a timeout

Annotations
@Nullable