Jacson

de.spieleck.config
Class Config

java.lang.Object
  extended byde.spieleck.config.Config

public class Config
extends java.lang.Object

Manager and Factory for Configurations.

Version:
?
Author:
fsn

Field Summary
protected static ConfigFileNode defaultConfig
          Semi-Singleton: The default setup is an singleton while still many setup objects may coexist.
protected static java.util.List listeners
          Registered listeners for change of data
 
Method Summary
static void addListener(ConfigListener listener)
          We supply a preliminary api to inform listeners about a change in configuration.
static ConfigNode getConfig()
          Get the global visible (singleton) config node.
protected static void handleChange(ConfigNode s)
           
protected static javax.xml.parsers.SAXParser newSAXParser()
          Obtain a new parser.
static ConfigFileNode parse(org.xml.sax.InputSource is)
          Parse setup tree from an InputSource without ConfigParamMap
static ConfigFileNode parse(org.xml.sax.InputSource is, ConfigParamMap pm)
          Parse setup tree from an InputSource with ConfigParamMap
static void removeListener(ConfigListener listener)
           
static ConfigNode setConfig(ConfigFileNode setup)
          Set the global visible (singleton) config node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected static java.util.List listeners
Registered listeners for change of data


defaultConfig

protected static ConfigFileNode defaultConfig
Semi-Singleton: The default setup is an singleton while still many setup objects may coexist.

Method Detail

parse

public static ConfigFileNode parse(org.xml.sax.InputSource is)
                            throws java.io.IOException,
                                   org.xml.sax.SAXException
Parse setup tree from an InputSource without ConfigParamMap

Returns:
a freshly parsed ConfigFileNode
Throws:
java.io.IOException
org.xml.sax.SAXException

parse

public static ConfigFileNode parse(org.xml.sax.InputSource is,
                                   ConfigParamMap pm)
                            throws java.io.IOException,
                                   org.xml.sax.SAXException
Parse setup tree from an InputSource with ConfigParamMap

Returns:
a freshly parsed ConfigFileNode
Throws:
java.io.IOException
org.xml.sax.SAXException

newSAXParser

protected static javax.xml.parsers.SAXParser newSAXParser()
                                                   throws org.xml.sax.SAXException,
                                                          javax.xml.parsers.ParserConfigurationException
Obtain a new parser.

Returns:
a new SAXParser
Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException

setConfig

public static ConfigNode setConfig(ConfigFileNode setup)
Set the global visible (singleton) config node.


getConfig

public static ConfigNode getConfig()
Get the global visible (singleton) config node.

Returns:
the global ConfigNode

addListener

public static void addListener(ConfigListener listener)
We supply a preliminary api to inform listeners about a change in configuration.


removeListener

public static void removeListener(ConfigListener listener)

handleChange

protected static void handleChange(ConfigNode s)

Spieleck

Copyleft 2002 spieleck.de.