org.apache.commons.messagelet
Class MessengerMDO

java.lang.Object
  extended by org.apache.commons.messagelet.MessageDrivenObjectSupport
      extended by org.apache.commons.messagelet.MessengerMDO
All Implemented Interfaces:
javax.jms.MessageListener, MessageDrivenObject, MessengerListener
Direct Known Subclasses:
BridgeMDO

public abstract class MessengerMDO
extends MessageDrivenObjectSupport
implements MessengerListener

MessengerMDO is an abstract base class for Messenger based MDO implementations. It provides access to the Messenger that was used to receive messages so that responses can be sent to the originating Messenger object and so reuse the same JMS Session and Connection for responses.

Version:
$Revision: 155459 $
Author:
James Strachan

Constructor Summary
MessengerMDO()
           
 
Method Summary
 Messenger getMessenger()
          Provides access to the current Messenger which was used to generate the current Message.
 MessengerManager getMessengerManager()
          Provides access to the current MessengerManager which manages the Messenger
 void setMessenger(Messenger messenger)
          Called whenever this MessageListener is added to a Messenger via the addListener() method to associate this MessageListener with a Messenger instance..
 void setMessengerManager(MessengerManager messengerManager)
           
 
Methods inherited from class org.apache.commons.messagelet.MessageDrivenObjectSupport
destroy, getLog, getServletContext, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.MessageListener
onMessage
 

Constructor Detail

MessengerMDO

public MessengerMDO()
Method Detail

getMessenger

public Messenger getMessenger()
Provides access to the current Messenger which was used to generate the current Message. This allows replies to be sent directly to the originating Messenger (and so the same JMS Session and Connection) which received the message


setMessenger

public void setMessenger(Messenger messenger)
Description copied from interface: MessengerListener
Called whenever this MessageListener is added to a Messenger via the addListener() method to associate this MessageListener with a Messenger instance..

Specified by:
setMessenger in interface MessengerListener

getMessengerManager

public MessengerManager getMessengerManager()
                                     throws javax.jms.JMSException
Provides access to the current MessengerManager which manages the Messenger

Throws:
javax.jms.JMSException

setMessengerManager

public void setMessengerManager(MessengerManager messengerManager)


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.