public class Configuration extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ALT_CONFIG_FILE
Alternate config file.
|
static File |
ALT_LIB_CONFIG_FILE
Non-JRE library location of config file.
|
static String |
DEFAULT_CONFIG_FILE
Name of the default config file.
|
static String |
DTD_FPI
The formal public identifier (FPI) of the configuration document type definition (DTD).
|
static String |
DTD_OLD_FPI
The old formal public identifier (FPI) of the configuration document type definition (DTD).
|
static String |
DTD_URL
The system identifier of the configuration document type definition (DTD).
|
static String |
ENTITY_DIRS_PROP
Name of property that specifies the direcotries that contains XML entities.
|
static int |
INT |
static int |
INT1 |
static File |
LIB_CONFIG_FILE
Library-location config file.
|
static String |
WEB_PROTOCOL_PROPERTY
Name of the system property that names the web protocol to use.
|
Modifier and Type | Method and Description |
---|---|
static Configuration |
getConfiguration()
Get the singleton configuration.
|
static Configuration |
getConfiguration(URL configFileUrl)
Get the singleton configuration.
|
static Configuration |
getConfigurationWithoutException()
Get the singleton configuration without exception.
|
List |
getEntityRefDirs()
Get the entity reference directories.
|
ExecServerConfig |
getExecServerConfig(String objectKey)
Get an exec-server configuration.
|
Collection |
getExecServerConfigs()
Get the exec-server configurations.
|
Collection |
getExecServerConfigs(Class clazz)
Get the exec-server configurations.
|
String |
getNameServerPort()
Get the name server port, if any.
|
int |
getNameServerStateFrequency()
Get the frequency with which the name server saves its state.
|
String |
getNameServerURL()
Get the name server URL.
|
Context |
getObjectContext()
Get the object context.
|
int |
getServerMgrPort()
Get the port number on which the server manager is listening.
|
String |
getWebServerBaseURL()
Get the web server base URL.
|
File |
getWebServerDocumentDirectory()
Get the web server document directory.
|
void |
mergeProperties(Properties targetProps)
Merge the properties in the configuration into the given properties.
|
String |
toXML()
Serialize this configuration into a serialized XML document.
|
Node |
toXML(Document document) |
public static final int INT
public static final int INT1
public static final String ENTITY_DIRS_PROP
public static final String DEFAULT_CONFIG_FILE
public static final String ALT_CONFIG_FILE
public static final File LIB_CONFIG_FILE
public static final File ALT_LIB_CONFIG_FILE
public static final String DTD_FPI
public static final String DTD_OLD_FPI
public static final String DTD_URL
public static final String WEB_PROTOCOL_PROPERTY
public static Configuration getConfiguration() throws IOException, SAXException
org.apache.oodt.commons.Configuration.url
or the file in the
user's home directory called .edarc.xml if the system property isn't
specified. It parses the file and returns a Configuration
object
initialized with the data specified therein.IOException
- If reading the configuration file fails.SAXException
- If parsing the configuration file fails.MalformedURLException
- If the URL specification is invalid.public static Configuration getConfiguration(URL configFileUrl) throws SAXException, IOException
Configuration
object
initialized with the data specified therein. Added by Chris Mattmann 12/05/03.IOException
- If an I/O error occurs.SAXException
public static Configuration getConfigurationWithoutException()
getConfiguration()
but traps all checked
exceptions. If the configuration can't be read, it returns null.public String toXML() throws DOMException
DOMException
- If an error occurs constructing the XML structure.public Node toXML(Document document) throws DOMException
document
- The document to which the XML structure will belong.DOMException
- If an error occurs constructing the XML structure.public void mergeProperties(Properties targetProps)
targetProps
- The target properties.public Collection getExecServerConfigs()
ExecServerConfig
.public Collection getExecServerConfigs(Class clazz)
clazz
- The class of exec servers that will be returned.ExecServerConfig
.public ExecServerConfig getExecServerConfig(String objectKey)
objectKey
- The object key of the Exec Server to retrieve.ExecServerConfig
or null if object key not found.public String getWebServerBaseURL()
public File getWebServerDocumentDirectory()
public String getNameServerURL()
public String getNameServerPort()
public int getNameServerStateFrequency()
public Context getObjectContext() throws NamingException
NamingException
- If the context can't be created.public List getEntityRefDirs()
String
s naming directories for entity references.public int getServerMgrPort()
Copyright © 1999–2017 Apache OODT. All rights reserved.