接口 MessageSendingOperations<D>
- 类型参数:
D
- the destination type
- 所有已知子接口:
DestinationResolvingMessageSendingOperations<D>
,JmsMessageOperations
,SimpMessageSendingOperations
- 所有已知实现类:
AbstractDestinationResolvingMessagingTemplate
,AbstractMessageReceivingTemplate
,AbstractMessageSendingTemplate
,AbstractMessagingTemplate
,GenericMessagingTemplate
,JmsMessagingTemplate
,SimpMessagingTemplate
public interface MessageSendingOperations<D>
Operations for sending messages to a destination.- 从以下版本开始:
- 4.0
- 作者:
- Mark Fisher, Rossen Stoyanchev
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
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
convertAndSend(D destination, Object payload, Map<String,Object> headers)
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(D destination, Message<?> message)
Send a message to the given destination.void
send(Message<?> message)
Send a message to a default destination.
方法详细资料
send
void send(Message<?> message) throws MessagingException
Send a message to a default destination.- 参数:
message
- the message to send- 抛出:
MessagingException
send
void send(D destination, Message<?> message) throws MessagingException
Send a message to the given destination.- 参数:
destination
- the target destinationmessage
- the message to send- 抛出:
MessagingException
convertAndSend
void convertAndSend(Object payload) throws MessagingException
Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message and send it to a default destination.- 参数:
payload
- the Object to use as payload- 抛出:
MessagingException
convertAndSend
void convertAndSend(D destination, Object payload) throws MessagingException
Convert the given Object to serialized form, possibly using aMessageConverter
, wrap it as a message and send it to the given destination.- 参数:
destination
- the target destinationpayload
- the Object to use as payload- 抛出:
MessagingException
convertAndSend
void convertAndSend(D destination, Object payload, Map<String,Object> headers) throws MessagingException
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.- 参数:
destination
- the target destinationpayload
- the Object to use as payloadheaders
- the headers for the message to send- 抛出:
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.- 参数:
payload
- the Object to use as payloadpostProcessor
- the post processor to apply to the message- 抛出:
MessagingException
convertAndSend
void convertAndSend(D destination, Object payload, 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.- 参数:
destination
- the target destinationpayload
- the Object to use as payloadpostProcessor
- the post processor to apply to the message- 抛出:
MessagingException
convertAndSend
void convertAndSend(D destination, Object payload, @Nullable Map<String,Object> headers, @Nullable MessagePostProcessor postProcessor) throws MessagingException
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.- 参数:
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- 抛出:
MessagingException