org.codehaus.plexus.classworlds.launcher
Class ConfigurationParser

java.lang.Object
  extended by org.codehaus.plexus.classworlds.launcher.ConfigurationParser

public class ConfigurationParser
extends java.lang.Object

Event based launcher configuration parser.

Version:
$Id: ConfigurationParser.java 7933 2008-12-17 17:33:58Z bentmann $
Author:
bob mcwhirter, Jason van Zyl, Igor Fedorenko

Field Summary
static java.lang.String IMPORT_PREFIX
           
static java.lang.String LOAD_PREFIX
           
static java.lang.String MAIN_PREFIX
           
static java.lang.String OPTIONALLY_PREFIX
          Optionally spec prefix.
static java.lang.String SET_PREFIX
           
 
Constructor Summary
ConfigurationParser(ConfigurationHandler handler, java.util.Properties systemProperties)
           
 
Method Summary
protected  java.lang.String filter(java.lang.String text)
          Filter a string for system properties.
protected  void loadGlob(java.lang.String line, boolean optionally)
          Load a glob into the specified classloader.
 void parse(java.io.InputStream is)
          Parse launcher configuration file and send events to the handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAIN_PREFIX

public static final java.lang.String MAIN_PREFIX
See Also:
Constant Field Values

SET_PREFIX

public static final java.lang.String SET_PREFIX
See Also:
Constant Field Values

IMPORT_PREFIX

public static final java.lang.String IMPORT_PREFIX
See Also:
Constant Field Values

LOAD_PREFIX

public static final java.lang.String LOAD_PREFIX
See Also:
Constant Field Values

OPTIONALLY_PREFIX

public static final java.lang.String OPTIONALLY_PREFIX
Optionally spec prefix.

See Also:
Constant Field Values
Constructor Detail

ConfigurationParser

public ConfigurationParser(ConfigurationHandler handler,
                           java.util.Properties systemProperties)
Method Detail

parse

public void parse(java.io.InputStream is)
           throws java.io.IOException,
                  ConfigurationException,
                  DuplicateRealmException,
                  NoSuchRealmException
Parse launcher configuration file and send events to the handler.

Throws:
java.io.IOException
ConfigurationException
DuplicateRealmException
NoSuchRealmException

loadGlob

protected void loadGlob(java.lang.String line,
                        boolean optionally)
                 throws java.net.MalformedURLException,
                        java.io.FileNotFoundException,
                        ConfigurationException
Load a glob into the specified classloader.

Parameters:
line - The path configuration line.
realm - The realm to populate
optionally - Whether the path is optional or required
Throws:
java.net.MalformedURLException - If the line does not represent a valid path element.
java.io.FileNotFoundException - If the line does not represent a valid path element in the filesystem.
ConfigurationException

filter

protected java.lang.String filter(java.lang.String text)
                           throws ConfigurationException
Filter a string for system properties.

Parameters:
text - The text to filter.
Returns:
The filtered text.
Throws:
ConfigurationException - If the property does not exist or if there is a syntax error.


Copyright © 2002-2009 Codehaus. All Rights Reserved.