Interface MessageSendingOperations<D>
- Type Parameters:
D
- the destination type
- All Known Subinterfaces:
DestinationResolvingMessageSendingOperations<D>
,JmsMessageOperations
,SimpMessageSendingOperations
- All Known Implementing Classes:
AbstractDestinationResolvingMessagingTemplate
,AbstractMessageReceivingTemplate
,AbstractMessageSendingTemplate
,AbstractMessagingTemplate
,GenericMessagingTemplate
,JmsMessagingTemplate
,SimpMessagingTemplate
public interface MessageSendingOperations<D>
Operations for sending messages to a destination.
- Since:
- 4.0
- Author:
- Mark Fisher, Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionvoid
convertAndSend
(D destination, Object payload) Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message and send it to the given destination.void
Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message with the given headers and send it to the given destination.void
convertAndSend
(D destination, Object payload, Map<String, Object> headers, MessagePostProcessor postProcessor) Convert the given 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 given destination.void
convertAndSend
(D destination, Object payload, MessagePostProcessor postProcessor) Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message, apply the given post-processor, and send the resulting message to the given destination.void
convertAndSend
(Object payload) Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message and send it to a default destination.void
convertAndSend
(Object payload, MessagePostProcessor postProcessor) Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message, apply the given post-processor, and send the resulting message to a default destination.void
Send a message to the given destination.void
Send a message to a default destination.
-
Method Details
-
send
Send a message to a default destination.- Parameters:
message
- the message to send- Throws:
MessagingException
-
send
Send a message to the given destination.- Parameters:
destination
- the target destinationmessage
- the message to send- Throws:
MessagingException
-
convertAndSend
Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message and send it to a default destination.- Parameters:
payload
- the Object to use as payload- Throws:
MessagingException
-
convertAndSend
Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message and send it to the given destination.- Parameters:
destination
- the target destinationpayload
- the Object to use as payload- Throws:
MessagingException
-
convertAndSend
void convertAndSend(D destination, Object payload, @Nullable Map<String, Object> headers) throws MessagingExceptionConvert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message with the given headers and send it to the given destination.- Parameters:
destination
- the target destinationpayload
- the Object to use as payloadheaders
- the headers for the message to send- Throws:
MessagingException
-
convertAndSend
void convertAndSend(Object payload, @Nullable MessagePostProcessor postProcessor) throws MessagingException Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message, apply the given post-processor, and send the resulting message to a default destination.- Parameters:
payload
- the Object to use as payloadpostProcessor
- the post-processor to apply to the message- Throws:
MessagingException
-
convertAndSend
void convertAndSend(D destination, Object payload, @Nullable MessagePostProcessor postProcessor) throws MessagingException Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message, apply the given post-processor, and send the resulting message to the given destination.- Parameters:
destination
- the target destinationpayload
- the Object to use as payloadpostProcessor
- the post-processor to apply to the message- Throws:
MessagingException
-
convertAndSend
void convertAndSend(D destination, Object payload, @Nullable Map<String, Object> headers, @Nullable MessagePostProcessor postProcessor) throws MessagingExceptionConvert the given 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 given destination.- Parameters:
destination
- the target destinationpayload
- the Object to use as payloadheaders
- the headers for the message to sendpostProcessor
- the post-processor to apply to the message- Throws:
MessagingException
-