com.hammurapi.config.bootstrap
Class Bootstrapper<T>

java.lang.Object
  extended by 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

Field Summary
static URL[] DEFAULT_BOOT_CLASS_PATH
           
 
Constructor Summary
Bootstrapper()
           
Bootstrapper(URL[] bootClassPath)
           
 
Method Summary
 FactoryClosure<T> create(String uri, TokenExpander.TokenSource tokens, String[] profilePath, Map<Class<?>,Iterable<?>> services, Map<String,?> bindings)
           
static void main(String[] args)
          Loads configuration resource and executes it.
static void start(String[] args)
          For NT service.
static void stop(String[] args)
          For NT service wrapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BOOT_CLASS_PATH

public static final URL[] DEFAULT_BOOT_CLASS_PATH
Constructor Detail

Bootstrapper

public Bootstrapper()
             throws ConfigurationException
Throws:
ConfigurationException

Bootstrapper

public Bootstrapper(URL[] bootClassPath)
             throws ConfigurationException
Throws:
ConfigurationException
Method Detail

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:

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