public class Configurator extends Object implements ConfigurationHandler
Launcher
configurator.Constructor and Description |
---|
Configurator(ClassWorld world)
Construct.
|
Configurator(Launcher launcher)
Construct.
|
Modifier and Type | Method and Description |
---|---|
void |
addImportFrom(String relamName,
String importSpec)
Add an import specification from a realm
|
void |
addLoadFile(File file)
Add a file to the realm
|
void |
addLoadURL(URL url)
Add an URL to the realm
|
void |
addRealm(String realmName)
Define a new realm
|
void |
associateRealms()
Associate parent realms with their children.
|
void |
configure(InputStream is)
Configure from a file.
|
void |
setAppMain(String mainClassName,
String mainRealmName)
Define the main class name
|
void |
setClassWorld(ClassWorld world)
set world.
|
public Configurator(Launcher launcher)
launcher
- The launcher to configure.public Configurator(ClassWorld world)
world
- The classWorld to configure.public void setClassWorld(ClassWorld world)
world
- The classWorld to configure.public void configure(InputStream is) throws IOException, ConfigurationException, DuplicateRealmException, NoSuchRealmException
is
- The config input streamIOException
- If an error occurs reading the config file.MalformedURLException
- If the config file contains invalid URLs.ConfigurationException
- If the config file is corrupt.DuplicateRealmException
- If the config file defines two realms with the same id.NoSuchRealmException
- If the config file defines a main entry point in
a non-existent realm.public void associateRealms()
public void addImportFrom(String relamName, String importSpec) throws NoSuchRealmException
ConfigurationHandler
addImportFrom
in interface ConfigurationHandler
relamName
- the realm nameimportSpec
- the import specificationNoSuchRealmException
public void addLoadFile(File file)
ConfigurationHandler
addLoadFile
in interface ConfigurationHandler
file
- the file to load content frompublic void addLoadURL(URL url)
ConfigurationHandler
addLoadURL
in interface ConfigurationHandler
url
- the url to load content frompublic void addRealm(String realmName) throws DuplicateRealmException
ConfigurationHandler
addRealm
in interface ConfigurationHandler
realmName
- the new realm nameDuplicateRealmException
public void setAppMain(String mainClassName, String mainRealmName)
ConfigurationHandler
setAppMain
in interface ConfigurationHandler
mainClassName
- the main class namemainRealmName
- the main realm from which the main class is loadedCopyright © 2002–2014 Codehaus. All rights reserved.