etm.core.configuration
Class XmlEtmConfigurator

java.lang.Object
  extended by etm.core.configuration.XmlEtmConfigurator

public class XmlEtmConfigurator
extends java.lang.Object

A configurator that reads its configuration from xml. Currently supports both jetm_config 1.0 and 1.2 configurations. See EtmManager howto that is part of the documentation and http://jetm.void.fm/dtd for currently supported dtds.

Every xml configuration file has to include one of the following doctype definitions

 <!DOCTYPE jetm-config PUBLIC "-// void.fm //DTD JETM Config 1.0//EN"
                           "http://jetm.void.fm/dtd/jetm_config_1_0.dtd">

 <!DOCTYPE jetm-config PUBLIC "-// void.fm //DTD JETM Config 1.2//EN"
                            http://jetm.void.fm/dtd/jetm_config_1_2.dtd">
 

Be aware that you need to start and stop the EtmMonitor before using it. Example:

  XmlEtmConfigurator.configure(new File("etm-config.xml"));

  EtmMonitor etmMonitor = EtmManager.getEtmMonitor();
  etmMonitor.start();
  ...
 

Version:
$Revision: 150 $
Author:
void.fm

Method Summary
static void configure(java.io.File file)
          Configures the EtmManager using the given file.
static void configure(java.io.InputStream in)
          Configures the EtmManager using the given inputStream.
static void configure(java.lang.String config)
          Configures the EtmManager using the given string which represents a valid XmlEtmConfigurator configuration.
static void configure(java.net.URL configLocation)
          Configures the EtmManager using the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

configure

public static void configure(java.lang.String config)
Configures the EtmManager using the given string which represents a valid XmlEtmConfigurator configuration.

Parameters:
config - The xml configuration string.
Throws:
EtmConfigurationException - Thrown in case an error occures.

configure

public static void configure(java.net.URL configLocation)
Configures the EtmManager using the given URL.

Parameters:
configLocation - The location of the file which may be remote or locally.
Throws:
EtmConfigurationException - Thrown in case an error occures.

configure

public static void configure(java.io.InputStream in)
Configures the EtmManager using the given inputStream. The stream will not be closed after usage.

Parameters:
in - The inputStream to be used.
Throws:
EtmConfigurationException - Thrown in case an error occures.

configure

public static void configure(java.io.File file)
Configures the EtmManager using the given file. Delegates to configure(java.net.URL) only.

Parameters:
file - The config filefile to be used.
Throws:
EtmConfigurationException - Thrown in case an error occures.


Copyright © 2004,2005, 2006, 2007 void.fm. All Rights Reserved.