Top Description Methods
org.springframework.messaging.core

public Interface DestinationResolvingMessageReceivingOperations<D>

extends MessageReceivingOperations<D>
Known Direct Implementers
org.springframework.messaging.core.AbstractDestinationResolvingMessagingTemplate
Type Parameters
<D>
the type of destination to receive messages from
Imports
org.springframework.lang.Nullable, org.springframework.messaging.Message, .MessagingException

Extends MessageReceivingOperations and adds operations for receiving messages from a destination specified as a (resolvable) String name.
Authors
Mark Fisher, Rossen Stoyanchev
Since
4.0
See Also
DestinationResolver

Method Summary

Modifier and TypeMethod and Description
public Message<?>
receive(String
the destination name to resolve
destinationName
)

Redeclares org.springframework.messaging.core.MessageReceivingOperations.receive.

Resolve the given destination name and receive a message from it.

public <T> T
receiveAndConvert(String
the destination name to resolve
destinationName
,
Class<T>
the target class for the converted payload
targetClass
)

Redeclares org.springframework.messaging.core.MessageReceivingOperations.receiveAndConvert.

Resolve the given destination name, receive a message from it, convert the payload to the specified target type.

Inherited from org.springframework.messaging.core.MessageReceivingOperations:
receivereceiveAndConvert

Method Detail

receiveback to summary
public Message<?> receive(String destinationName) throws MessagingException

Redeclares org.springframework.messaging.core.MessageReceivingOperations.receive.

Resolve the given destination name and receive a message from it.

Parameters
destinationName:String

the destination name to resolve

Returns:Message<?>

Doc from org.springframework.messaging.core.MessageReceivingOperations.receive.

the received message, possibly null if the message could not be received, for example due to a timeout

Annotations
@Nullable
receiveAndConvertback to summary
public <T> T receiveAndConvert(String destinationName, Class<T> targetClass) throws MessagingException

Redeclares org.springframework.messaging.core.MessageReceivingOperations.receiveAndConvert.

Resolve the given destination name, receive a message from it, convert the payload to the specified target type.

Parameters
destinationName:String

the destination name to resolve

targetClass:Class<T>

the target class for the converted payload

Returns:T

Doc from org.springframework.messaging.core.MessageReceivingOperations.receiveAndConvert.

the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout

Annotations
@Nullable