接口 DestinationResolvingMessageReceivingOperations<D>
- 所有超级接口:
MessageReceivingOperations<D>
public interface DestinationResolvingMessageReceivingOperations<D> extends MessageReceivingOperations<D>
ExtendsMessageReceivingOperations
and adds operations for receiving messages from a destination specified as a (resolvable) String name.- 从以下版本开始:
- 4.0
- 作者:
- Mark Fisher, Rossen Stoyanchev
- 另请参阅:
DestinationResolver
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Message<?>
receive(String destinationName)
Resolve the given destination name and receive a message from it.<T> T
receiveAndConvert(String destinationName, Class<T> targetClass)
Resolve the given destination name, receive a message from it, convert the payload to the specified target type.从接口继承的方法 org.springframework.messaging.core.MessageReceivingOperations
receive, receive, receiveAndConvert, receiveAndConvert
方法详细资料
receive
Message<?> receive(String destinationName) throws MessagingException
Resolve the given destination name and receive a message from it.- 参数:
destinationName
- the destination name to resolve- 抛出:
MessagingException
receiveAndConvert
<T> T receiveAndConvert(String destinationName, Class<T> targetClass) throws MessagingException
Resolve the given destination name, receive a message from it, convert the payload to the specified target type.- 参数:
destinationName
- the destination name to resolvetargetClass
- the target class for the converted payload- 抛出:
MessagingException