org.apache.commons.messenger
Class MessengerManager

java.lang.Object
  extended by org.apache.commons.messenger.MessengerManager

public class MessengerManager
extends Object

MessengerManager is a manager of Messenger instances.

Version:
$Revision: 155459 $
Author:
James Strachan

Constructor Summary
MessengerManager()
           
 
Method Summary
 void addMessenger(Messenger messenger)
           
 void close()
           
static void configure(String xmlURL)
          A helper method to explicitly configure the MessengerManager singleton from a given XML deployment configuration document
protected static MessengerManager createInstance()
          Factory method to create the singleton MessengerManager instance
static Messenger get(String name)
          Uses the default configuration mechanism this method will return the Messenger for the given name.
static MessengerManager getInstance()
          Returns the singleton MessengerManager
 Messenger getMessenger(String name)
          Returns the messenger for the given name
 Iterator getMessengerNames()
          Returns an iterator over the names of the available Messenger instances
static MessengerManager load(String xmlURL)
          A helper method to load a MessengerManager from a given XML deployment configuration document
 void removeMessenger(Messenger messenger)
           
static void setInstance(MessengerManager messengerManager)
          Installs a new singleton MessengerManager instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessengerManager

public MessengerManager()
Method Detail

get

public static Messenger get(String name)
                     throws javax.jms.JMSException
Uses the default configuration mechanism this method will return the Messenger for the given name. The Messenger.xml file will be searched on the classpath

Throws:
javax.jms.JMSException

load

public static MessengerManager load(String xmlURL)
                             throws javax.jms.JMSException
A helper method to load a MessengerManager from a given XML deployment configuration document

Throws:
javax.jms.JMSException

configure

public static void configure(String xmlURL)
                      throws javax.jms.JMSException
A helper method to explicitly configure the MessengerManager singleton from a given XML deployment configuration document

Throws:
javax.jms.JMSException

getMessenger

public Messenger getMessenger(String name)
Returns the messenger for the given name


addMessenger

public void addMessenger(Messenger messenger)

removeMessenger

public void removeMessenger(Messenger messenger)

getMessengerNames

public Iterator getMessengerNames()
Returns an iterator over the names of the available Messenger instances


getInstance

public static MessengerManager getInstance()
                                    throws javax.jms.JMSException
Returns the singleton MessengerManager

Throws:
javax.jms.JMSException

setInstance

public static void setInstance(MessengerManager messengerManager)
Installs a new singleton MessengerManager instance


close

public void close()

createInstance

protected static MessengerManager createInstance()
                                          throws javax.jms.JMSException
Factory method to create the singleton MessengerManager instance

Throws:
javax.jms.JMSException


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