Interface MessageReceivingOperations<D>
- Type Parameters:
D- the type of destination
- All Known Subinterfaces:
DestinationResolvingMessageReceivingOperations<D>,JmsMessageOperations
- All Known Implementing Classes:
AbstractDestinationResolvingMessagingTemplate,AbstractMessageReceivingTemplate,AbstractMessagingTemplate,GenericMessagingTemplate,JmsMessagingTemplate
public interface MessageReceivingOperations<D>
Operations for receiving messages from a destination.
- Since:
- 4.0
- Author:
- Mark Fisher, Rossen Stoyanchev
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionMessage<?>receive()Receive a message from a default destination.Message<?>Receive a message from the given destination.<T> TreceiveAndConvert(D destination, Class<T> targetClass) Receive a message from the given destination and convert its payload to the specified target class.<T> TreceiveAndConvert(Class<T> targetClass) Receive a message from a default destination and convert its payload to the specified target class.
-
Method Details
-
receive
Receive a message from a default destination.- Returns:
- the received message, possibly
nullif the message could not be received, for example due to a timeout - Throws:
MessagingException
-
receive
Receive a message from the given destination.- Parameters:
destination- the target destination- Returns:
- the received message, possibly
nullif the message could not be received, for example due to a timeout - Throws:
MessagingException
-
receiveAndConvert
Receive a message from a default destination and convert its payload to the specified target class.- Parameters:
targetClass- the target class to convert the payload to- Returns:
- the converted payload of the reply message, possibly
nullif the message could not be received, for example due to a timeout - Throws:
MessagingException
-
receiveAndConvert
Receive a message from the given destination and convert its payload to the specified target class.- Parameters:
destination- the target destinationtargetClass- the target class to convert the payload to- Returns:
- the converted payload of the reply message, possibly
nullif the message could not be received, for example due to a timeout - Throws:
MessagingException
-