org.exolab.jms.config
Class ConfigurationManager
java.lang.Object
|
+--org.exolab.jms.config.ConfigurationManager
- public class ConfigurationManager
- extends java.lang.Object
The ConfigurationManager manages provides class methods for setting and
getting the configuration file. It should be set by the application main
line through setConfig(java.lang.String)
and subsequently accessed by other
components through getConfig()
.
- Version:
- $Revision: 1.16 $ $Date: 2004/01/03 04:00:56 $
- Author:
- Jim Alateras
Method Summary |
static org.exolab.jms.config.Configuration |
getConfig()
Returns the configuration |
static org.exolab.jms.config.Connector |
getConnector()
Deprecated. This method relies on users knowing that the first connector
is the one that will be used. |
static org.exolab.jms.config.Connector |
getConnector(org.exolab.jms.config.types.SchemeType scheme)
Returns the connector configuration for the supplied scheme |
static void |
setConfig(org.exolab.jms.config.Configuration config)
Set the configuration |
static void |
setConfig(java.lang.String path)
Load the configuration file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationManager
public ConfigurationManager()
setConfig
public static void setConfig(java.lang.String path)
throws FileDoesNotExistException,
ConfigurationFileException
- Load the configuration file
- Parameters:
path
- xml config file conforming to openjms.xsd schema- Throws:
FileDoesNotExistException
- if the file does not existConfigurationFileException
- if the file is not well-formed
setConfig
public static void setConfig(org.exolab.jms.config.Configuration config)
- Set the configuration
- Parameters:
config
- the configuration
getConfig
public static org.exolab.jms.config.Configuration getConfig()
- Returns the configuration
- Returns:
- the configuration
- Throws:
java.lang.IllegalStateException
- if the configuration has not been
initialised
getConnector
public static org.exolab.jms.config.Connector getConnector(org.exolab.jms.config.types.SchemeType scheme)
- Returns the connector configuration for the supplied scheme
- Parameters:
scheme
- the connector scheme- Returns:
- the connector configuration for the supplied scheme, or null,
if no configuration exists
- Throws:
java.lang.IllegalArgumentException
- if scheme is nulljava.lang.IllegalStateException
- if the configuration is not initialised
getConnector
public static org.exolab.jms.config.Connector getConnector()
- Deprecated. This method relies on users knowing that the first connector
is the one that will be used.
- Returns the default connector. This is the first configured connector
in the configuration.
- Returns:
- the default connector
- Throws:
java.lang.IllegalStateException
- if the configuration is not initialised- See Also:
getConnector(SchemeType)
Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.