|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SessionAwareMessageListener
Variant of the standard JMS MessageListener interface, offering not only the received Message but also the underlying JMS Session object. The latter can be used to send reply messages, without the need to access an external Connection/Session, i.e. without the need to access the underlying ConnectionFactory.
Supported by Spring's DefaultMessageListenerContainer, SimpleMessageListenerContainer and ServerSessionMessageListenerContainer, as direct alternative to the standard JMS MessageListener interface. Typically not supported by JCA-based listener containers: For maximum compatibility, implement a standard JMS MessageListener instead.
AbstractMessageListenerContainer.setMessageListener(java.lang.Object)
,
DefaultMessageListenerContainer
,
SimpleMessageListenerContainer
,
ServerSessionMessageListenerContainer
,
MessageListener
Method Summary | |
---|---|
void |
onMessage(Message message,
Session session)
Callback for processing a received JMS message. |
Method Detail |
---|
void onMessage(Message message, Session session) throws JMSException
Implementors are supposed to process the given Message, typically sending reply messages through the given Session.
message
- the received JMS messagesession
- the underlying JMS Session
JMSException
- if thrown by JMS methods
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |