public interface JmsMessageOperations extends org.springframework.messaging.core.MessageSendingOperations<Destination>, org.springframework.messaging.core.MessageReceivingOperations<Destination>, org.springframework.messaging.core.MessageRequestReplyOperations<Destination>
MessageSendingOperations
, MessageReceivingOperations
and MessageRequestReplyOperations
for JMS related operations that allow to specify
a destination name rather than the actual Destination
.JmsTemplate
,
MessageSendingOperations
,
MessageReceivingOperations
,
MessageRequestReplyOperations
Modifier and Type | Method and Description |
---|---|
void |
convertAndSend(String destinationName,
Object payload)
Convert the given Object to serialized form, possibly using a
MessageConverter ,
wrap it as a message and send it to the given destination. |
void |
convertAndSend(String destinationName,
Object payload,
Map<String,Object> headers)
Convert the given Object to serialized form, possibly using a
MessageConverter ,
wrap it as a message with the given headers and send it to
the given destination. |
void |
convertAndSend(String destinationName,
Object payload,
Map<String,Object> headers,
org.springframework.messaging.core.MessagePostProcessor postProcessor)
Convert the given Object to serialized form, possibly using a
MessageConverter ,
wrap it as a message with the given headers, apply the given post processor,
and send the resulting message to the given destination. |
void |
convertAndSend(String destinationName,
Object payload,
org.springframework.messaging.core.MessagePostProcessor postProcessor)
Convert the given Object to serialized form, possibly using a
MessageConverter ,
wrap it as a message, apply the given post processor, and send
the resulting message to the given destination. |
<T> T |
convertSendAndReceive(String destinationName,
Object request,
Class<T> targetClass)
Convert the given request Object to serialized form, possibly using a
MessageConverter , send
it as a Message to the given destination, receive the reply and convert
its body of the specified target class. |
<T> T |
convertSendAndReceive(String destinationName,
Object request,
Class<T> targetClass,
org.springframework.messaging.core.MessagePostProcessor requestPostProcessor)
Convert the given request Object to serialized form, possibly using a
MessageConverter ,
apply the given post processor and send the resulting Message to the
given destination, receive the reply and convert its body of the given
target class. |
<T> T |
convertSendAndReceive(String destinationName,
Object request,
Map<String,Object> headers,
Class<T> targetClass)
Convert the given request Object to serialized form, possibly using a
MessageConverter , send
it as a Message with the given headers, to the specified destination,
receive the reply and convert its body of the specified target class. |
<T> T |
convertSendAndReceive(String destinationName,
Object request,
Map<String,Object> headers,
Class<T> targetClass,
org.springframework.messaging.core.MessagePostProcessor requestPostProcessor)
Convert the given request Object to serialized form, possibly using a
MessageConverter ,
wrap it as a message with the given headers, apply the given post processor
and send the resulting Message to the specified destination, receive
the reply and convert its body of the given target class. |
org.springframework.messaging.Message<?> |
receive(String destinationName)
Receive a message from the given destination.
|
<T> T |
receiveAndConvert(String destinationName,
Class<T> targetClass)
Receive a message from the given destination and convert its payload to the
specified target class.
|
void |
send(String destinationName,
org.springframework.messaging.Message<?> message)
Send a message to the given destination.
|
org.springframework.messaging.Message<?> |
sendAndReceive(String destinationName,
org.springframework.messaging.Message<?> requestMessage)
Send a request message and receive the reply from the given destination.
|
convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, send, send
void send(String destinationName, org.springframework.messaging.Message<?> message) throws org.springframework.messaging.MessagingException
destinationName
- the name of the target destinationmessage
- the message to sendorg.springframework.messaging.MessagingException
void convertAndSend(String destinationName, Object payload) throws org.springframework.messaging.MessagingException
MessageConverter
,
wrap it as a message and send it to the given destination.destinationName
- the name of the target destinationpayload
- the Object to use as payloadorg.springframework.messaging.MessagingException
void convertAndSend(String destinationName, Object payload, Map<String,Object> headers) throws org.springframework.messaging.MessagingException
MessageConverter
,
wrap it as a message with the given headers and send it to
the given destination.destinationName
- the name of the target destinationpayload
- the Object to use as payloadheaders
- the headers for the message to sendorg.springframework.messaging.MessagingException
void convertAndSend(String destinationName, Object payload, org.springframework.messaging.core.MessagePostProcessor postProcessor) throws org.springframework.messaging.MessagingException
MessageConverter
,
wrap it as a message, apply the given post processor, and send
the resulting message to the given destination.destinationName
- the name of the target destinationpayload
- the Object to use as payloadpostProcessor
- the post processor to apply to the messageorg.springframework.messaging.MessagingException
void convertAndSend(String destinationName, Object payload, @Nullable Map<String,Object> headers, @Nullable org.springframework.messaging.core.MessagePostProcessor postProcessor) throws org.springframework.messaging.MessagingException
MessageConverter
,
wrap it as a message with the given headers, apply the given post processor,
and send the resulting message to the given destination.destinationName
- the name of the target destinationpayload
- the Object to use as payloadheaders
- the headers for the message to sendpostProcessor
- the post processor to apply to the messageorg.springframework.messaging.MessagingException
@Nullable org.springframework.messaging.Message<?> receive(String destinationName) throws org.springframework.messaging.MessagingException
destinationName
- the name of the target destinationnull
if the message could not
be received, for example due to a timeoutorg.springframework.messaging.MessagingException
@Nullable <T> T receiveAndConvert(String destinationName, Class<T> targetClass) throws org.springframework.messaging.MessagingException
destinationName
- the name of the target destinationtargetClass
- the target class to convert the payload tonull
if
the message could not be received, for example due to a timeoutorg.springframework.messaging.MessagingException
@Nullable org.springframework.messaging.Message<?> sendAndReceive(String destinationName, org.springframework.messaging.Message<?> requestMessage) throws org.springframework.messaging.MessagingException
destinationName
- the name of the target destinationrequestMessage
- the message to sendnull
if the message could not be received,
for example due to a timeoutorg.springframework.messaging.MessagingException
@Nullable <T> T convertSendAndReceive(String destinationName, Object request, Class<T> targetClass) throws org.springframework.messaging.MessagingException
MessageConverter
, send
it as a Message
to the given destination, receive the reply and convert
its body of the specified target class.destinationName
- the name of the target destinationrequest
- payload for the request message to sendtargetClass
- the target type to convert the payload of the reply tonull
if the message
could not be received, for example due to a timeoutorg.springframework.messaging.MessagingException
@Nullable <T> T convertSendAndReceive(String destinationName, Object request, @Nullable Map<String,Object> headers, Class<T> targetClass) throws org.springframework.messaging.MessagingException
MessageConverter
, send
it as a Message
with the given headers, to the specified destination,
receive the reply and convert its body of the specified target class.destinationName
- the name of the target destinationrequest
- payload for the request message to sendheaders
- the headers for the request message to sendtargetClass
- the target type to convert the payload of the reply tonull
if the message
could not be received, for example due to a timeoutorg.springframework.messaging.MessagingException
@Nullable <T> T convertSendAndReceive(String destinationName, Object request, Class<T> targetClass, org.springframework.messaging.core.MessagePostProcessor requestPostProcessor) throws org.springframework.messaging.MessagingException
MessageConverter
,
apply the given post processor and send the resulting Message
to the
given destination, receive the reply and convert its body of the given
target class.destinationName
- the name of the target destinationrequest
- payload for the request message to sendtargetClass
- the target type to convert the payload of the reply torequestPostProcessor
- post process to apply to the request messagenull
if the message
could not be received, for example due to a timeoutorg.springframework.messaging.MessagingException
@Nullable <T> T convertSendAndReceive(String destinationName, Object request, Map<String,Object> headers, Class<T> targetClass, org.springframework.messaging.core.MessagePostProcessor requestPostProcessor) throws org.springframework.messaging.MessagingException
MessageConverter
,
wrap it as a message with the given headers, apply the given post processor
and send the resulting Message
to the specified destination, receive
the reply and convert its body of the given target class.destinationName
- the name of the target destinationrequest
- payload for the request message to sendtargetClass
- the target type to convert the payload of the reply torequestPostProcessor
- post process to apply to the request messagenull
if the message
could not be received, for example due to a timeoutorg.springframework.messaging.MessagingException