接口 DestinationResolvingMessageSendingOperations<D>
- 所有超级接口:
MessageSendingOperations<D>
public interface DestinationResolvingMessageSendingOperations<D> extends MessageSendingOperations<D>
ExtendsMessageSendingOperations
and adds operations for sending messages to a destination specified as a (resolvable) String name.- 从以下版本开始:
- 4.0
- 作者:
- Mark Fisher, Rossen Stoyanchev
- 另请参阅:
DestinationResolver
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 <T> void
convertAndSend(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> void
convertAndSend(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> void
convertAndSend(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> void
convertAndSend(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.void
send(String destinationName, Message<?> message)
Resolve the given destination name to a destination and send a message to it.从接口继承的方法 org.springframework.messaging.core.MessageSendingOperations
convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, send, send
方法详细资料
send
void send(String destinationName, Message<?> message) throws MessagingException
Resolve the given destination name to a destination and send a message to it.- 参数:
destinationName
- the destination name to resolvemessage
- the message to send- 抛出:
MessagingException
convertAndSend
<T> void convertAndSend(String destinationName, T payload) 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 and send it to the resolved destination.- 参数:
destinationName
- the destination name to resolvepayload
- the Object to use as payload- 抛出:
MessagingException
convertAndSend
<T> void convertAndSend(String destinationName, T payload, Map<String,Object> headers) 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 with the given headers and send it to the resolved destination.- 参数:
destinationName
- the destination name to resolvepayload
- the Object to use as payloadheaders
- headers for the message to send- 抛出:
MessagingException
convertAndSend
<T> void convertAndSend(String destinationName, T payload, 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.- 参数:
destinationName
- the destination name to resolvepayload
- the Object to use as payloadpostProcessor
- the post processor to apply to the message- 抛出:
MessagingException
convertAndSend
<T> void convertAndSend(String destinationName, T payload, Map<String,Object> headers, 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 with the given headers, apply the given post processor, and send the resulting message to the resolved destination.- 参数:
destinationName
- the destination name to resolvepayload
- the Object to use as payloadheaders
- headers for the message to sendpostProcessor
- the post processor to apply to the message- 抛出:
MessagingException