org.apache.stratum.messenger
Class MessengerComponent

java.lang.Object
  extended byorg.apache.stratum.messenger.MessengerComponent
All Implemented Interfaces:
Configurable, Initializable

public class MessengerComponent
extends java.lang.Object
implements Configurable, Initializable

This class is the Messenger component. It is an adaptor that allows the ComponentLoader to startup MessengerManager. Client code wishing to use Messenger should ask MessengerManager directly for Messenger instances.

Version:
$Id: MessengerComponent.java 264191 2005-08-29 18:07:52Z henning $
Author:
Eric Dobbs
See Also:
MessengerManager, Messenger

Constructor Summary
MessengerComponent()
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration configuration)
          Configure MessengerManager.
 void initialize()
          Initialize the MessengerManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessengerComponent

public MessengerComponent()
Method Detail

configure

public void configure(org.apache.commons.configuration.Configuration configuration)
Configure MessengerManager. MessengerManager requires a URL to a Messenger.xml file. The messenger.properties file should define one property named 'messenger.xml.url' identifying the location of Messenger.xml.

Specified by:
configure in interface Configurable
Parameters:
configuration - Configuration object containing the 'messenger.xml.url' property

initialize

public void initialize()
                throws java.lang.Exception
Initialize the MessengerManager.

Specified by:
initialize in interface Initializable
Throws:
java.lang.Exception - is thrown if the file defined in 'messenger.xml.url' can't be found. JMSException will be thrown if MessengerManager.configure is unhappy with the value from 'messenger.xml.url'


Copyright © 2002-2005 Apache Software Foundation. All Rights Reserved.