com.hammurapi.config.bootstrap
Class Bootstrapper<T>
java.lang.Object
com.hammurapi.config.bootstrap.Bootstrapper<T>
- All Implemented Interfaces:
- BootstrapFactory<T>
public class Bootstrapper<T>
- extends Object
- implements BootstrapFactory<T>
This class creates configurator boot classloader, loads
com.hammurapi.config.runtime.BootstrapFactoryImpl and delegates
create() method invocations to the BootstrapFactoryImpl.
- Author:
- Pavel Vlasov
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_BOOT_CLASS_PATH
public static final URL[] DEFAULT_BOOT_CLASS_PATH
Bootstrapper
public Bootstrapper()
throws ConfigurationException
- Throws:
ConfigurationException
Bootstrapper
public Bootstrapper(URL[] bootClassPath)
throws ConfigurationException
- Throws:
ConfigurationException
create
public FactoryClosure<T> create(String uri,
TokenExpander.TokenSource tokens,
String[] profilePath,
Map<Class<?>,Iterable<?>> services,
Map<String,?> bindings)
throws ConfigurationException
- Specified by:
create in interface BootstrapFactory<T>
- Throws:
ConfigurationException
main
public static void main(String[] args)
throws Exception
- Loads configuration resource and executes it. The resource root must implement Runnable.
Usage java [java options] com.hammurapi.bootstrap.Bootstrapper [options] <configuration file url>
Options:
- --help Prints help and exits.
- --codebase <url>[;<url>] Semicolon separated list of boot class path URL's.
- --interactive If this option is provided, unresolved token substitutions are requested from the user.
- --properties <url> URL to load token substitutions from. Loaded properties are backed by
system properties.
- --profile <profile path> Slash-separated profile path.
- --threads <number of threads> Thread pool size.
- Parameters:
args -
- Throws:
Exception
start
public static void start(String[] args)
throws InterruptedException
- For NT service. Retries startup in the case of exceptions.
- Parameters:
args -
- Throws:
InterruptedException
Exception
stop
public static void stop(String[] args)
throws ConfigurationException
- For NT service wrapper.
- Parameters:
args -
- Throws:
ConfigurationException