Package org.jfree.base
Class AbstractBoot
java.lang.Object
org.jfree.base.AbstractBoot
- All Implemented Interfaces:
org.jfree.base.modules.SubSystem
- Direct Known Subclasses:
BaseBoot
The common base for all Boot classes.
This initializes the subsystem and all dependent subsystems. Implementors of this class have to provide a public static getInstance() method which returns a singleton instance of the booter implementation.
Further creation of Boot object should be prevented using protected or private constructors in that class, or proper initialzation cannot be guaranteed.
- Author:
- Thomas Morgner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Configuration
createDefaultHierarchicalConfiguration
(String staticConfig, String userConfig, boolean addSysProps) Creates a default configuration setup, which loads its settings from the static configuration (defaults provided by the developers of the library) and the user configuration (settings provided by the deployer).protected Configuration
createDefaultHierarchicalConfiguration
(String staticConfig, String userConfig, boolean addSysProps, Class source) Creates a default hierarchical configuration.Returns the global configuration as extended configuration.Returns the global configuration.org.jfree.base.modules.PackageManager
Returns the packageManager instance of the package manager.protected abstract BootableProjectInfo
Returns the project info.final boolean
Checks, whether the booting is complete.final boolean
Checks, whether the booting is in progress.protected AbstractBoot
loadBooter
(String classname) Loads the specified booter implementation.protected abstract Configuration
Loads the configuration.protected abstract void
Performs the boot.final void
start()
Starts the boot process.
-
Constructor Details
-
AbstractBoot
protected AbstractBoot()Default constructor.
-
-
Method Details
-
getPackageManager
Returns the packageManager instance of the package manager.- Specified by:
getPackageManager
in interfaceorg.jfree.base.modules.SubSystem
- Returns:
- The package manager.
-
getGlobalConfig
Returns the global configuration.- Specified by:
getGlobalConfig
in interfaceorg.jfree.base.modules.SubSystem
- Returns:
- The global configuration.
-
isBootInProgress
Checks, whether the booting is in progress.- Returns:
- true, if the booting is in progress, false otherwise.
-
isBootDone
Checks, whether the booting is complete.- Returns:
- true, if the booting is complete, false otherwise.
-
loadConfiguration
Loads the configuration. This will be called exactly once.- Returns:
- The configuration.
-
start
Starts the boot process. -
performBoot
Performs the boot. -
getProjectInfo
Returns the project info.- Returns:
- The project info.
-
loadBooter
Loads the specified booter implementation.- Parameters:
classname
- the class name.- Returns:
- The boot class.
-
createDefaultHierarchicalConfiguration
protected Configuration createDefaultHierarchicalConfiguration(String staticConfig, String userConfig, boolean addSysProps) Creates a default configuration setup, which loads its settings from the static configuration (defaults provided by the developers of the library) and the user configuration (settings provided by the deployer). The deployer's settings override the developer's settings. If the parameteraddSysProps
is set to true, the system properties will be added as third configuration layer. The system properties configuration allows to override all other settings.- Parameters:
staticConfig
- the resource name of the developers configurationuserConfig
- the resource name of the deployers configurationaddSysProps
- a flag defining whether to include the system properties into the configuration.- Returns:
- the configured Configuration instance.
-
createDefaultHierarchicalConfiguration
protected Configuration createDefaultHierarchicalConfiguration(String staticConfig, String userConfig, boolean addSysProps, Class source) Creates a default hierarchical configuration.- Parameters:
staticConfig
- the static configuration.userConfig
- the user configuration.addSysProps
- additional system properties.source
- the source.- Returns:
- The configuration.
-
getExtendedConfig
Returns the global configuration as extended configuration.- Specified by:
getExtendedConfig
in interfaceorg.jfree.base.modules.SubSystem
- Returns:
- the extended configuration.
-