org.apache.qpid.configuration
Class Configuration

java.lang.Object
  extended by org.apache.qpid.configuration.Configuration

public class Configuration
extends Object


Nested Class Summary
static class Configuration.InitException
           
 
Field Summary
protected  org.apache.commons.cli.CommandLine _commandLine
           
protected  File _configFile
           
protected  org.apache.commons.cli.Options _options
           
static String DEFAULT_CONFIG_FILE
           
static String DEFAULT_LOG_CONFIG_FILENAME
           
static String QPID_HOME
           
(package private)  String QPIDHOME
           
 
Constructor Summary
Configuration()
           
 
Method Summary
 File getConfigFile()
           
 String getOptionValue(String... option)
          getOptionValue from the configuration
 void loadConfig(File file)
           
 void processCommandline(String[] args)
           
 void setConfig(File file)
           
 void setOption(org.apache.commons.cli.Option option)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QPID_HOME

public static final String QPID_HOME
See Also:
Constant Field Values

QPIDHOME

final String QPIDHOME

DEFAULT_LOG_CONFIG_FILENAME

public static final String DEFAULT_LOG_CONFIG_FILENAME
See Also:
Constant Field Values

DEFAULT_CONFIG_FILE

public static final String DEFAULT_CONFIG_FILE
See Also:
Constant Field Values

_options

protected final org.apache.commons.cli.Options _options

_commandLine

protected org.apache.commons.cli.CommandLine _commandLine

_configFile

protected File _configFile
Constructor Detail

Configuration

public Configuration()
Method Detail

processCommandline

public void processCommandline(String[] args)
                        throws Configuration.InitException
Throws:
Configuration.InitException

setConfig

public void setConfig(File file)

setOption

public void setOption(org.apache.commons.cli.Option option)
Parameters:
option - The option to set.

getOptionValue

public String getOptionValue(String... option)
getOptionValue from the configuration

Parameters:
option - variable argument, first string is option to get, second if present is the default value.
Returns:
the String for the given option or null if not present (if default value not specified)

loadConfig

public void loadConfig(File file)
                throws Configuration.InitException
Throws:
Configuration.InitException

getConfigFile

public File getConfigFile()


Licensed to the Apache Software Foundation