com.ibm.tivoli.maximo.report.birt.engine

Class MXSystemOSGiFrameworkLauncher

  • java.lang.Object
    • com.ibm.tivoli.maximo.report.birt.engine.MXSystemOSGiFrameworkLauncher


  • public class MXSystemOSGiFrameworkLauncher
    extends java.lang.Object
    This is the core class to launch the OSGi-Equinox framework. NOTE: This is an additional instance of the OSGi-Equinox framework that's used by the MAXIMO report scheduler code. The report scheduler code cannot use the reportweb module's OSGi-Equinox framework, as it will not be visible to this layer of code. The OSGi-Equinox framework platform launched here uses the following files - properties\report\launch.ini => contains initialization parameters to launch platform - reportweb\webmodule\WEB-INF\platform\configuration2\config.ini => contains configuration information (different set of plug-ins are loaded)
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      protected class  MXSystemOSGiFrameworkLauncher.ChildFirstURLClassLoader
      The ChildFirstURLClassLoader alters regular ClassLoader delegation and will check the URLs used in its initialization for matching classes before delegating to it's parent.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      protected java.lang.String[] buildCommandLineArguments() 
      protected java.util.Map buildInitialPropertyMap()
      buildInitialPropertyMap create the inital set of properties from the contents of launch.ini and for a few other properties necessary to launch defaults are supplied if not provided.
      protected static boolean deleteDirectory(java.io.File directory)
      deleteDirectory is a cocnvenience method to recursively delete a directory
      void deploy()
      Deploy the OSGi framework libraries into a location suitable for execution.
      void destroy() 
      protected int findMax(java.lang.String[] candidates) 
      java.lang.ClassLoader getFrameworkClassLoader()
      Returns the classloader used for loading the OSGi framework.
      java.lang.ClassLoader getFrameworkContextClassLoader()
      Returns the OSGi framework context classloader.
      java.util.Properties getFrameworkInternalProperties(java.lang.ClassLoader cl) 
      protected java.io.File getPlatformDirectory()
      Returns the Platfom Directory is where the OSGi software is installed
      void init() 
      protected java.util.Properties loadProperties(java.lang.String resource)
      Load properties from the specified resource
      protected java.lang.String searchFor(java.lang.String target, java.lang.String start)
      Searches for the given target directory starting in the "plugins" subdirectory of the given location.
      void start()
      Start OSGi framework Read launcher.ini to create a set of initial properties and use the "commandline" configuration parameter to create the equivalent command line arguments available when starting Eclipse.
      void stop()
      Shutdown the OSGi framework and make it avialable for garbage collection.
      void undeploy()
      Undeploy the OSGi framework libraries from the execution location.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MXSystemOSGiFrameworkLauncher

        public MXSystemOSGiFrameworkLauncher()
    • Method Detail

      • init

        public void init()
      • destroy

        public void destroy()
      • deploy

        public void deploy()
        Deploy the OSGi framework libraries into a location suitable for execution.
      • undeploy

        public void undeploy()
        Undeploy the OSGi framework libraries from the execution location.
      • start

        public void start()
        Start OSGi framework Read launcher.ini to create a set of initial properties and use the "commandline" configuration parameter to create the equivalent command line arguments available when starting Eclipse.
      • getFrameworkInternalProperties

        public java.util.Properties getFrameworkInternalProperties(java.lang.ClassLoader cl)
      • buildInitialPropertyMap

        protected java.util.Map buildInitialPropertyMap()
        buildInitialPropertyMap create the inital set of properties from the contents of launch.ini and for a few other properties necessary to launch defaults are supplied if not provided. The value '@null' will set the map value to null.
        Returns:
        a map containing the initial properties
      • buildCommandLineArguments

        protected java.lang.String[] buildCommandLineArguments()
      • stop

        public void stop()
        Shutdown the OSGi framework and make it avialable for garbage collection. The default implementation also has special handling for Apache Commons Logging to "release" any resources associated with the frameworkContextClassLoader.
      • deleteDirectory

        protected static boolean deleteDirectory(java.io.File directory)
        deleteDirectory is a cocnvenience method to recursively delete a directory
        Parameters:
        directory - - the directory to delete.
        Returns:
        was the delete succesful
      • getFrameworkContextClassLoader

        public java.lang.ClassLoader getFrameworkContextClassLoader()
        Returns the OSGi framework context classloader.
        Returns:
        a Classloader with the OSGi framework's context classloader.
      • getFrameworkClassLoader

        public java.lang.ClassLoader getFrameworkClassLoader()
        Returns the classloader used for loading the OSGi framework.
        Returns:
      • getPlatformDirectory

        protected java.io.File getPlatformDirectory()
        Returns the Platfom Directory is where the OSGi software is installed
        Returns:
        the framework install location
      • loadProperties

        protected java.util.Properties loadProperties(java.lang.String resource)
        Load properties from the specified resource
        Parameters:
        resource - - The properties file name
        Returns:
        the properties
      • searchFor

        protected java.lang.String searchFor(java.lang.String target,
                                             java.lang.String start)
        Searches for the given target directory starting in the "plugins" subdirectory of the given location. If one is found then this location is returned; otherwise an exception is thrown.
        Parameters:
        target -
        start - the location to begin searching
        Returns:
        the location where target directory was found
      • findMax

        protected int findMax(java.lang.String[] candidates)