接口 DestinationResolvingMessageRequestReplyOperations<D>
- 类型参数:
- D- the destination type
 - 所有超级接口:
- MessageRequestReplyOperations<D>
 - public interface DestinationResolvingMessageRequestReplyOperations<D> extends MessageRequestReplyOperations<D> Extends- MessageRequestReplyOperationsand adds operations for sending and receiving messages to and from a destination specified as a (resolvable) String name.- 从以下版本开始:
- 4.0
- 作者:
- Mark Fisher, Rossen Stoyanchev
- 另请参阅:
- DestinationResolver
 
- 方法概要- 所有方法 实例方法 抽象方法 - 修饰符和类型 - 方法 - 说明 - <T> T- convertSendAndReceive(String destinationName, Object request, 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(String destinationName, Object request, 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(String destinationName, Object request, Map<String,Object> headers, 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(String destinationName, Object request, Map<String,Object> headers, 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(String destinationName, Message<?> requestMessage)Resolve the given destination name to a destination and send the given message, receive a reply and return it.- 从接口继承的方法 org.springframework.messaging.core.MessageRequestReplyOperations- convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, sendAndReceive, sendAndReceive
 
 
- 方法详细资料- sendAndReceive- @Nullable Message<?> sendAndReceive(String destinationName, Message<?> requestMessage) throws MessagingException Resolve the given destination name to a destination and send the given message, receive a reply and return it.- 参数:
- destinationName- the name of the target destination
- requestMessage- the message to send
- 返回:
- the received message, possibly nullif the message could not be received, for example due to a timeout
- 抛出:
- MessagingException
 
 - convertSendAndReceive- @Nullable <T> T convertSendAndReceive(String destinationName, Object request, Class<T> targetClass) throws MessagingException 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.- 参数:
- destinationName- the name of the target destination
- request- the payload for the request message to send
- targetClass- the target class to convert the payload of the reply to
- 返回:
- the converted payload of the reply message, possibly nullif the message could not be received, for example due to a timeout
- 抛出:
- MessagingException
 
 - convertSendAndReceive- @Nullable <T> T convertSendAndReceive(String destinationName, Object request, @Nullable Map<String,Object> headers, Class<T> targetClass) throws MessagingException 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.- 参数:
- destinationName- the name of the target destination
- request- the payload for the request message to send
- headers- the headers for the request message to send
- targetClass- the target class to convert the payload of the reply to
- 返回:
- the converted payload of the reply message, possibly nullif the message could not be received, for example due to a timeout
- 抛出:
- MessagingException
 
 - convertSendAndReceive- @Nullable <T> T convertSendAndReceive(String destinationName, Object request, Class<T> targetClass, @Nullable MessagePostProcessor requestPostProcessor) throws MessagingException 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.- 参数:
- destinationName- the name of the target destination
- request- the payload for the request message to send
- targetClass- the target class to convert the payload of the reply to
- requestPostProcessor- post process for the request message
- 返回:
- the converted payload of the reply message, possibly nullif the message could not be received, for example due to a timeout
- 抛出:
- MessagingException
 
 - convertSendAndReceive- @Nullable <T> T convertSendAndReceive(String destinationName, Object request, @Nullable Map<String,Object> headers, Class<T> targetClass, @Nullable MessagePostProcessor requestPostProcessor) throws MessagingException 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.- 参数:
- destinationName- the name of the target destination
- request- the payload for the request message to send
- headers- the headers for the request message to send
- targetClass- the target class to convert the payload of the reply to
- requestPostProcessor- post process for the request message
- 返回:
- the converted payload of the reply message, possibly nullif the message could not be received, for example due to a timeout
- 抛出:
- MessagingException