Class AbstractBoot
- java.lang.Object
 - 
- org.pentaho.reporting.libraries.base.boot.AbstractBoot
 
 
- 
- All Implemented Interfaces:
 SubSystem
- Direct Known Subclasses:
 LibBaseBoot
public abstract class AbstractBoot extends Object implements SubSystem
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 singleton behaviour cannot be guaranteed.- Author:
 - Thomas Morgner
 
 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractBoot()Default constructor. 
- 
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected HierarchicalConfigurationcreateDefaultHierarchicalConfiguration(String staticConfig, String userConfig, boolean addSysProps, Class source)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).ExceptiongetBootFailureReason()Returns the failure reason for the boot process.StringgetConfigurationDomain()ExtendedConfigurationgetExtendedConfig()Returns the global configuration as extended configuration.ConfigurationgetGlobalConfig()Returns the global configuration.ObjectFactorygetObjectFactory()PackageManagergetPackageManager()Returns the packageManager instance of the package manager.protected abstract ProjectInformationgetProjectInfo()Returns the project info.booleanisBootDone()Checks, whether the booting is complete.booleanisBootFailed()Checks whether the booting failed.booleanisBootInProgress()Checks, whether the booting is in progress.protected AbstractBootloadBooter(String classname)Loads the specified booter implementation.static AbstractBootloadBooter(String classname, Class source)Loads the specified booter-class.protected abstract ConfigurationloadConfiguration()Loads the configuration.protected abstract voidperformBoot()Performs the boot.voidstart()Starts the boot process. 
 - 
 
- 
- 
Method Detail
- 
getPackageManager
public PackageManager getPackageManager()
Returns the packageManager instance of the package manager.- Specified by:
 getPackageManagerin interfaceSubSystem- Returns:
 - The package manager.
 
 
- 
getGlobalConfig
public Configuration getGlobalConfig()
Returns the global configuration.- Specified by:
 getGlobalConfigin interfaceSubSystem- Returns:
 - The global configuration.
 
 
- 
isBootInProgress
public final boolean isBootInProgress()
Checks, whether the booting is in progress.- Returns:
 - true, if the booting is in progress, false otherwise.
 
 
- 
isBootDone
public boolean isBootDone()
Checks, whether the booting is complete.- Returns:
 - true, if the booting is complete, false otherwise.
 
 
- 
getConfigurationDomain
public String getConfigurationDomain()
 
- 
loadConfiguration
protected abstract Configuration loadConfiguration()
Loads the configuration. This will be called exactly once.- Returns:
 - The configuration.
 
 
- 
start
public final void start()
Starts the boot process. The boot process is synchronized and will block if parallel booting is not finished yet. Any failure in booting will set thebootFailedproperty to true. If booting is finished, thebootDoneproperty is set to true. 
- 
isBootFailed
public boolean isBootFailed()
Checks whether the booting failed. If booting failed, the reason for the failure (the Exception that caused the error) is stored as propertybootFailureReason.- Returns:
 - true, if booting failed, false otherwise.
 
 
- 
getBootFailureReason
public Exception getBootFailureReason()
Returns the failure reason for the boot process. This method returns null, if booting was successful.- Returns:
 - the failure reason.
 
 
- 
performBoot
protected abstract void performBoot()
Performs the boot. 
- 
getProjectInfo
protected abstract ProjectInformation getProjectInfo()
Returns the project info.- Returns:
 - The project info.
 
 
- 
loadBooter
protected AbstractBoot loadBooter(String classname)
Loads the specified booter implementation.- Parameters:
 classname- the class name.- Returns:
 - The boot class.
 
 
- 
loadBooter
public static AbstractBoot loadBooter(String classname, Class source)
Loads the specified booter-class.- Parameters:
 classname- the classname of the booter class.source- the source-class from where to get the classloader.- Returns:
 - the instantiated booter or null, if no booter could be loaded.
 
 
- 
createDefaultHierarchicalConfiguration
protected HierarchicalConfiguration createDefaultHierarchicalConfiguration(String staticConfig, String userConfig, boolean addSysProps, Class source)
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 parameteraddSysPropsis 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.source- the classloader source to load resources from.- Returns:
 - the configured Configuration instance.
 
 
- 
getExtendedConfig
public ExtendedConfiguration getExtendedConfig()
Returns the global configuration as extended configuration.- Specified by:
 getExtendedConfigin interfaceSubSystem- Returns:
 - the extended configuration.
 
 
- 
getObjectFactory
public ObjectFactory getObjectFactory()
 
 - 
 
 -