Package com.atlassian.plugin.osgi.util
Class OsgiSystemBundleUtil
java.lang.Object
com.atlassian.plugin.osgi.util.OsgiSystemBundleUtil
Utility method for accessing system bundle.
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe identifier of the system bundle. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.osgi.framework.BundlegetSystemBundle(org.osgi.framework.BundleContext currentBundleContext) Returns the system bundle.static org.osgi.framework.BundleContextgetSystemBundleContext(org.osgi.framework.Bundle currentBundle) Returns the system bundle context.static org.osgi.framework.BundleContextgetSystemBundleContext(org.osgi.framework.BundleContext currentBundleContext) Returns the system bundle context.
-
Field Details
-
SYSTEM_BUNDLE_ID
public static final int SYSTEM_BUNDLE_IDThe 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
-