public final class BootStrap extends Object
DONT FORGET: LIMIT THIS CLASS TO BOOTSTRAP AND NOTHING MORE!! According on this first sentence, i have added a system for extracting inner resources, and option for restarting system... *_*
BASIC Structure: ${home}/lib all libraries contained in single jar file (under META-INF/lib and/or /lib folder of this single jar)
if ${home} is not writable, system will use jvm.temp.dir\{} as home folder. In this case, update is not supported yet.
Option that you could set on command line with a "--name=value" or in a properties files:
Delegated main class
Locale directory management:
Log information
Class Path management
JVM Specification Version can be checked with parameter: 'BootStrap.minimalJvmVersion'. If current JVM is not backward compatible, the system halt.
Configuration priority (high to less):
BootStrap set two system properties:
Delegated main class can manage restart of system by throw a KeystonException with "restart" or "clean" operation string".
Main class should be in this case:
public static int main(final String[] args) {
throw new KeystoneException(KeystoneException.Operation.RESTART);
}
An update process can set system properties "BootStrap.location" with the new jar and restart on it
| Constructor and Description |
|---|
BootStrap() |
| Modifier and Type | Method and Description |
|---|---|
static Throwable |
findRootCause(Throwable throwable)
Get Root Cause.
|
static void |
main(String[] args)
Main methods.
|
static void |
processKeystoneException(File home,
Throwable exception)
Process Keystone Exception
|
static void |
restart(Runnable runnable)
Restart all system using value of system property "BootStrap.location".
|
public static void main(String[] args) throws IOException
args - IOException - if something is wrong when reading properties files.public static void processKeystoneException(File home, Throwable exception)
home - throwable - public static Throwable findRootCause(Throwable throwable)
throwable - public static void restart(Runnable runnable)
runnable - runnable class before restarting.Copyright © 2010–2014 Intelligents-ia. All rights reserved.