Class OsgiSystemBundleUtil

java.lang.Object
com.atlassian.plugin.osgi.util.OsgiSystemBundleUtil

public class OsgiSystemBundleUtil extends Object
Utility method for accessing system bundle.
Since:
3.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The identifier of the system bundle.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.osgi.framework.Bundle
    getSystemBundle(org.osgi.framework.BundleContext currentBundleContext)
    Returns the system bundle.
    static org.osgi.framework.BundleContext
    getSystemBundleContext(org.osgi.framework.Bundle currentBundle)
    Returns the system bundle context.
    static org.osgi.framework.BundleContext
    getSystemBundleContext(org.osgi.framework.BundleContext currentBundleContext)
    Returns the system bundle context.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SYSTEM_BUNDLE_ID

      public static final int SYSTEM_BUNDLE_ID
      The identifier of the system bundle.
      Since:
      3.0
      See Also:
  • Constructor Details

    • OsgiSystemBundleUtil

      public OsgiSystemBundleUtil()
  • Method Details

    • getSystemBundle

      public static org.osgi.framework.Bundle getSystemBundle(org.osgi.framework.BundleContext currentBundleContext)
      Returns the system bundle.
      Parameters:
      currentBundleContext - The bundle context used to get the system bundle.
      Returns:
      The system bundle.
      Since:
      3.0
    • getSystemBundleContext

      public static org.osgi.framework.BundleContext getSystemBundleContext(org.osgi.framework.Bundle currentBundle)
      Returns the system bundle context.
      Parameters:
      currentBundle - The current bundle used to get the system bundle.
      Returns:
      The system bundle context.
      Throws:
      IllegalStateException - if the current bundle is not in the STARTING, ACTIVE or STOPPING states.
      Since:
      3.0
    • getSystemBundleContext

      public static org.osgi.framework.BundleContext getSystemBundleContext(org.osgi.framework.BundleContext currentBundleContext)
      Returns the system bundle context.
      Parameters:
      currentBundleContext - The bundle context used to get the system bundle.
      Returns:
      The system bundle context.
      Since:
      3.0