public abstract class OsgiPlatformDetector
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String[] |
EQUINOX_LABELS |
private static java.lang.String[] |
FELIX_LABELS |
private static boolean |
isR41 |
private static boolean |
isR42 |
private static java.lang.String[] |
KF_LABELS |
| Constructor and Description |
|---|
OsgiPlatformDetector() |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
containsAnyOf(java.lang.String source,
java.lang.String[] searchTerms) |
private static boolean |
determinePlatform(org.osgi.framework.BundleContext context,
java.lang.String[] labels) |
static java.lang.String |
getVersion(org.osgi.framework.BundleContext bundleContext)
Returns the OSGi platform version (using the manifest entries from the system bundle).
|
static boolean |
isEquinox(org.osgi.framework.BundleContext bundleContext)
Returns true if the given bundle context belongs to the Equinox platform.
|
static boolean |
isFelix(org.osgi.framework.BundleContext bundleContext)
Returns true if the given bundle context belongs to the Felix platform.
|
static boolean |
isKnopflerfish(org.osgi.framework.BundleContext bundleContext)
Returns true if the given bundle context belongs to the Knopflerfish platform.
|
static boolean |
isR41()
Determines if the current running platform implements OSGi Release 4.1 API or not.
|
static boolean |
isR42()
Determines if the current running platform implements OSGi Release 4.2 API or not.
|
private static final java.lang.String[] EQUINOX_LABELS
private static final java.lang.String[] KF_LABELS
private static final java.lang.String[] FELIX_LABELS
private static final boolean isR41
private static final boolean isR42
public static boolean isEquinox(org.osgi.framework.BundleContext bundleContext)
bundleContext - OSGi bundle contextpublic static boolean isKnopflerfish(org.osgi.framework.BundleContext bundleContext)
bundleContext - OSGi bundle contextpublic static boolean isFelix(org.osgi.framework.BundleContext bundleContext)
bundleContext - OSGi bundle contextprivate static boolean determinePlatform(org.osgi.framework.BundleContext context,
java.lang.String[] labels)
private static boolean containsAnyOf(java.lang.String source,
java.lang.String[] searchTerms)
public static java.lang.String getVersion(org.osgi.framework.BundleContext bundleContext)
bundleContext - bundle context to inspectpublic static boolean isR41()
public static boolean isR42()