D - the type of destination to receive messages frompublic interface MessageReceivingOperations<D>
GenericMessagingTemplate| Modifier and Type | Method and Description |
|---|---|
Message<?> |
receive()
Receive a message from a default destination.
|
Message<?> |
receive(D destination)
Receive a message from the given destination.
|
<T> T |
receiveAndConvert(Class<T> targetClass)
Receive a message from a default destination and convert its payload to the
specified target class.
|
<T> T |
receiveAndConvert(D destination,
Class<T> targetClass)
Receive a message from the given destination and convert its payload to the
specified target class.
|
Message<?> receive() throws MessagingException
null if the message could not
be received, for example due to a timeoutMessagingExceptionMessage<?> receive(D destination) throws MessagingException
destination - the target destinationnull if the message could not
be received, for example due to a timeoutMessagingException<T> T receiveAndConvert(Class<T> targetClass) throws MessagingException
targetClass - the target class to convert the payload tonull if
the message could not be received, for example due to a timeoutMessagingException<T> T receiveAndConvert(D destination, Class<T> targetClass) throws MessagingException
destination - the target destinationtargetClass - the target class to convert the payload tonull if
the message could not be received, for example due to a timeoutMessagingException