|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.java.plugin.boot.Boot
public final class Boot
Main class to get JPF based application running in different modes.
Application mode may be specified as jpf.boot.mode
configuration
parameter or System property (via -Djpf.boot.mode=
command line
argument). Supported values are:
jpf.boot.mode
configuration parameter can be found.
Application configuration is expected to be in Java properties format file. File look-up procedure is the following:
jpf.boot.config
System property, if present, load
configuration from that locationboot.properties
file in the current folder.boot.properties
resource in classpath (using
Boot.class.getClassLoader().getResource("boot.properties")
and Boot.class.getResource("boot.properties")
methods).If configuration could not be found, a warning will be printed to console. It is generally not an error to not use configuration file, you may provide JPF configuration parameters as System properties. They are always used as defaults for configuration properties.
Note that configuration properties will be loaded using
specially extended
version of Properties
class, which supports parameters
substitution. If there is no applicationRoot
property available
in the given configuration, the current folder will be published as default
value.
Standard configuration parameters are (all are optional when application is running in "shell" mode):
shell
.ApplicationInitializer
. Default is
DefaultApplicationInitializer
.BootErrorHandler
. Default is
BootErrorHandlerConsole
for "service" style
applications and BootErrorHandlerGui
for
"interactive" applications.SplashHandler
. Default is simple splash
handler that can only display an image.true
, the Boot class will not hide splash screen
at the end of boot procedure but delegate this function to application
code. Default value is false
.false
, the Boot class will not dispose splash
screen handler when hiding it. This allows you to reuse handler and show
splash screen back after it was hidden. Default value is
true
.
Field Summary | |
---|---|
static java.lang.String |
BOOT_ERROR_FILE_NAME
Name of the file, where to put boot error details. |
static java.lang.String |
BOOT_MODE_LOAD
"load" mode boot command value. |
static java.lang.String |
BOOT_MODE_RESTART
"restart" mode boot command value. |
static java.lang.String |
BOOT_MODE_SHELL
"shell" mode boot command value. |
static java.lang.String |
BOOT_MODE_START
"start" mode boot command value. |
static java.lang.String |
BOOT_MODE_STOP
"stop" mode boot command value. |
static java.lang.String |
PROP_BOOT_CONFIG
Boot configuration file location System property name. |
static java.lang.String |
PROP_BOOT_MODE
Boot mode System property name. |
Method Summary | |
---|---|
static Application |
boot(ExtendedProperties config,
boolean useControlService,
java.lang.String mode,
BootErrorHandler errorHandler,
java.lang.String[] args)
Boots application according to given configuration data. |
static SplashHandler |
getSplashHandler()
Returns current instance of splash screen handler if it is available or null . |
static void |
main(java.lang.String[] args)
Call this method to start/stop application. |
static void |
setSplashHandler(SplashHandler handler)
|
static void |
stopApplication(Application application)
Stops the application, shuts down plug-in manager and disposes log service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BOOT_ERROR_FILE_NAME
public static final java.lang.String PROP_BOOT_CONFIG
public static final java.lang.String PROP_BOOT_MODE
public static final java.lang.String BOOT_MODE_SHELL
public static final java.lang.String BOOT_MODE_START
public static final java.lang.String BOOT_MODE_STOP
public static final java.lang.String BOOT_MODE_RESTART
public static final java.lang.String BOOT_MODE_LOAD
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- command line arguments, not interpreted by this method but
passed to
ApplicationPlugin.initApplication(ExtendedProperties, String[])
methodpublic static Application boot(ExtendedProperties config, boolean useControlService, java.lang.String mode, BootErrorHandler errorHandler, java.lang.String[] args) throws java.lang.Exception
config
- boot configuration datauseControlService
- if true
, the control service will
started to allow handling application instance
from another processmode
- application run modeerrorHandler
- boot errors handler instanceargs
- command line arguments, not interpreted by this method but
passed to
ApplicationPlugin.initApplication(ExtendedProperties, String[])
method
null
java.lang.Exception
- if any un-handled error has occurredpublic static void stopApplication(Application application) throws java.lang.Exception
application
- application instance being stopped
java.lang.Exception
- if any error has occurred during application stoppingpublic static SplashHandler getSplashHandler()
null
.
null
if no active
instance availablepublic static void setSplashHandler(SplashHandler handler)
handler
- the new splash handler instance to set or
null
to dispose current handler directly
|
JPF 1.5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |