Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.gemini.blueprint.util
Class OsgiPlatformDetector

    java.lang.Object
      org.eclipse.gemini.blueprint.util.OsgiPlatformDetector

    public abstract class OsgiPlatformDetector

extends Object

Utility class that detects the running platform. Useful when certain quirks or tweaks have to made for a specific implementations. Currently we can detect Equinox, Knopflerfish and Felix platforms.

Author:
  Adrian Colyer, Costin Leau

Constructor Summary
`OsgiPlatformDetector()`

Method Summary
`static 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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OsgiPlatformDetector

    public OsgiPlatformDetector()

Method Detail

### isEquinox

    public static boolean isEquinox(org.osgi.framework.BundleContext bundleContext)

  Returns true if the given bundle context belongs to the Equinox platform.

  Parameters:
    `bundleContext` - OSGi bundle context
  Returns:
    true if the context indicates Equinox platform, false otherwise

### isKnopflerfish

    public static boolean isKnopflerfish(org.osgi.framework.BundleContext bundleContext)

  Returns true if the given bundle context belongs to the Knopflerfish platform.

  Parameters:
    `bundleContext` - OSGi bundle context
  Returns:
    true if the context indicates Knopflerfish platform, false otherwise

### isFelix

    public static boolean isFelix(org.osgi.framework.BundleContext bundleContext)

  Returns true if the given bundle context belongs to the Felix platform.

  Parameters:
    `bundleContext` - OSGi bundle context
  Returns:
    true if the context indicates Felix platform, false otherwise

### getVersion

    public static String getVersion(org.osgi.framework.BundleContext bundleContext)

  Returns the OSGi platform version (using the manifest entries from the system bundle). The version can be empty.

  Parameters:
    `bundleContext` - bundle context to inspect
  Returns:
    not-null system bundle version

### isR41

    public static boolean isR41()

  Determines if the current running platform implements OSGi Release 4.1 API or not.

  Returns:
    if the running platform implements OSGi 4.1 API

### isR42

    public static boolean isR42()

  Determines if the current running platform implements OSGi Release 4.2 API or not.

  Returns:
    if the running platform implements OSGi 4.2 API

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013. All Rights Reserved.