public class MessagingMessageListenerAdapter extends AbstractAdaptableMessageListener
MessageListener adapter that invokes a configurable
InvocableHandlerMethod.
Wraps the incoming Message to Spring's Message
abstraction, copying the JMS standard headers using a configurable
JmsHeaderMapper.
The original Message and the Session
are provided as additional arguments so that these can be injected as
method arguments if necessary.
Message,
JmsHeaderMapper,
InvocableHandlerMethodlogger| Constructor and Description |
|---|
MessagingMessageListenerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
onMessage(Message jmsMessage,
Session session)
Callback for processing a received JMS message.
|
void |
setHandlerMethod(org.springframework.messaging.handler.invocation.InvocableHandlerMethod handlerMethod)
Set the
InvocableHandlerMethod to use to invoke the method
processing an incoming Message. |
protected org.springframework.messaging.Message<?> |
toMessagingMessage(Message jmsMessage) |
buildMessage, extractMessage, getDestinationResolver, getMessageConverter, getMessagingMessageConverter, getResponseDestination, handleListenerException, handleResult, onMessage, postProcessProducer, postProcessResponse, resolveDefaultResponseDestination, sendResponse, setDefaultResponseDestination, setDefaultResponseQueueName, setDefaultResponseTopicName, setDestinationResolver, setHeaderMapper, setMessageConverterpublic void setHandlerMethod(org.springframework.messaging.handler.invocation.InvocableHandlerMethod handlerMethod)
InvocableHandlerMethod to use to invoke the method
processing an incoming Message.public void onMessage(Message jmsMessage, Session session) throws JMSException
SessionAwareMessageListenerImplementors are supposed to process the given Message, typically sending reply messages through the given Session.
jmsMessage - the received JMS message (never null)session - the underlying JMS Session (never null)JMSException - if thrown by JMS methodsprotected org.springframework.messaging.Message<?> toMessagingMessage(Message jmsMessage)