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 java.lang.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
  • Method Summary

    Modifier and Type
    Method
    Description
    java.lang.Exception
    Returns the failure reason for the boot process.
    Returns the global configuration as extended configuration.
    Returns the global configuration.
    Returns the packageManager instance of the package manager.
    final boolean
    Checks, whether the booting is complete.
    boolean
    Checks whether the booting failed.
    final boolean
    Checks, whether the booting is in progress.
    loadBooter(java.lang.String classname, java.lang.Class source)
    Loads the specified booter-class.
    final void
    Starts the boot process.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getPackageManager

      public PackageManager getPackageManager()
      Returns the packageManager instance of the package manager.
      Specified by:
      getPackageManager in interface SubSystem
      Returns:
      The package manager.
    • getGlobalConfig

      public Configuration getGlobalConfig()
      Returns the global configuration.
      Specified by:
      getGlobalConfig in interface SubSystem
      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 final boolean isBootDone()
      Checks, whether the booting is complete.
      Returns:
      true, if the booting is complete, false otherwise.
    • 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 the bootFailed property to true. If booting is finished, the bootDone property 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 property bootFailureReason.
      Returns:
      true, if booting failed, false otherwise.
    • getBootFailureReason

      public java.lang.Exception getBootFailureReason()
      Returns the failure reason for the boot process. This method returns null, if booting was successful.
      Returns:
      the failure reason.
    • loadBooter

      public static AbstractBoot loadBooter(java.lang.String classname, java.lang.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.
    • getExtendedConfig

      public ExtendedConfiguration getExtendedConfig()
      Returns the global configuration as extended configuration.
      Specified by:
      getExtendedConfig in interface SubSystem
      Returns:
      the extended configuration.