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
ConfigurationHandleraddImportFrom in interface ConfigurationHandlerrelamName - the realm nameimportSpec - the import specificationNoSuchRealmExceptionpublic void addLoadFile(File file)
ConfigurationHandleraddLoadFile in interface ConfigurationHandlerfile - the file to load content frompublic void addLoadURL(URL url)
ConfigurationHandleraddLoadURL in interface ConfigurationHandlerurl - the url to load content frompublic void addRealm(String realmName) throws DuplicateRealmException
ConfigurationHandleraddRealm in interface ConfigurationHandlerrealmName - the new realm nameDuplicateRealmExceptionpublic void setAppMain(String mainClassName, String mainRealmName)
ConfigurationHandlersetAppMain in interface ConfigurationHandlermainClassName - the main class namemainRealmName - the main realm from which the main class is loadedCopyright © 2002-2014 Codehaus. All Rights Reserved.