Class OsgiModule
java.lang.Object
org.eclipse.ease.modules.platform.OsgiModule
public class OsgiModule extends Object
Provides access to the OSGI runtime.
-
Constructor Summary
Constructors Constructor Description OsgiModule()
-
Method Summary
Modifier and Type Method Description org.osgi.framework.Bundle
getBundle(String name)
Get a bundle instance.org.osgi.framework.Bundle
installBundle(String url)
Install a bundle from a given location.
-
Constructor Details
-
OsgiModule
public OsgiModule()
-
-
Method Details
-
installBundle
public org.osgi.framework.Bundle installBundle(String url) throws org.osgi.framework.BundleExceptionInstall a bundle from a given location.- Parameters:
url
- install location URI- Returns:
- bundle instance or null
- Throws:
org.osgi.framework.BundleException
- if the installation failed. BundleException types thrown by this method include: BundleException.READ_ERROR , BundleException.DUPLICATE_BUNDLE_ERROR, BundleException.MANIFEST_ERROR, and BundleException.REJECTED_BY_HOOK. SecurityException - If the caller does not have the appropriate AdminPermission[installed bundle,LIFECYCLE], and the Java Runtime Environment supports permissions. IllegalStateException - If this BundleContext is no longer valid.
-
getBundle
Get a bundle instance. If the bundle is registered in the OSGI runtime, the bundle instance is returned- Parameters:
name
- bundle symbolic name to look for- Returns:
- bundle instance or
null
-