Interface DestinationResolvingMessageSendingOperations<D>
- Type Parameters:
D- the destination type
- All Superinterfaces:
MessageSendingOperations<D>
- All Known Implementing Classes:
AbstractDestinationResolvingMessagingTemplate,GenericMessagingTemplate
public interface DestinationResolvingMessageSendingOperations<D>
extends MessageSendingOperations<D>
Extends
MessageSendingOperations and adds operations for sending messages
to a destination specified as a (resolvable) String name.- Since:
- 4.0
- Author:
- Mark Fisher, Rossen Stoyanchev
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> voidconvertAndSend(String destinationName, T payload) Resolve the given destination name to a destination, convert the payload Object to serialized form, possibly using aMessageConverter, wrap it as a message and send it to the resolved destination.<T> voidconvertAndSend(String destinationName, T payload, Map<String, Object> headers) Resolve the given destination name to a destination, convert the payload Object to serialized form, possibly using aMessageConverter, wrap it as a message with the given headers and send it to the resolved destination.<T> voidconvertAndSend(String destinationName, T payload, Map<String, Object> headers, MessagePostProcessor postProcessor) Resolve the given destination name to a destination, convert the payload Object to serialized form, possibly using aMessageConverter, wrap it as a message with the given headers, apply the given post-processor, and send the resulting message to the resolved destination.<T> voidconvertAndSend(String destinationName, T payload, MessagePostProcessor postProcessor) Resolve the given destination name to a destination, convert the payload Object to serialized form, possibly using aMessageConverter, wrap it as a message, apply the given post-processor, and send the resulting message to the resolved destination.voidResolve the given destination name to a destination and send a message to it.Methods inherited from interface org.springframework.messaging.core.MessageSendingOperations
convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, send, send
-
Method Details
-
send
Resolve the given destination name to a destination and send a message to it.- Parameters:
destinationName- the destination name to resolvemessage- the message to send- Throws:
MessagingException
-
convertAndSend
Resolve the given destination name to a destination, convert the payload Object to serialized form, possibly using aMessageConverter, wrap it as a message and send it to the resolved destination.- Parameters:
destinationName- the destination name to resolvepayload- the Object to use as payload- Throws:
MessagingException
-
convertAndSend
<T> void convertAndSend(String destinationName, T payload, @Nullable Map<String, Object> headers) throws MessagingExceptionResolve the given destination name to a destination, convert the payload Object to serialized form, possibly using aMessageConverter, wrap it as a message with the given headers and send it to the resolved destination.- Parameters:
destinationName- the destination name to resolvepayload- the Object to use as payloadheaders- the headers for the message to send- Throws:
MessagingException
-
convertAndSend
<T> void convertAndSend(String destinationName, T payload, @Nullable MessagePostProcessor postProcessor) throws MessagingException Resolve the given destination name to a destination, convert the payload Object to serialized form, possibly using aMessageConverter, wrap it as a message, apply the given post-processor, and send the resulting message to the resolved destination.- Parameters:
destinationName- the destination name to resolvepayload- the Object to use as payloadpostProcessor- the post-processor to apply to the message- Throws:
MessagingException
-
convertAndSend
<T> void convertAndSend(String destinationName, T payload, @Nullable Map<String, Object> headers, @Nullable MessagePostProcessor postProcessor) throws MessagingExceptionResolve the given destination name to a destination, convert the payload Object to serialized form, possibly using aMessageConverter, wrap it as a message with the given headers, apply the given post-processor, and send the resulting message to the resolved destination.- Parameters:
destinationName- the destination name to resolvepayload- the Object to use as payloadheaders- the headers for the message to sendpostProcessor- the post-processor to apply to the message- Throws:
MessagingException
-