public class OsgiModule
extends java.lang.Object
Constructor and Description |
---|
OsgiModule() |
Modifier and Type | Method and Description |
---|---|
org.osgi.framework.Bundle |
getBundle(java.lang.String name)
Get a bundle instance.
|
org.osgi.framework.Bundle |
installBundle(java.lang.String url)
Install a bundle from a given location.
|
public org.osgi.framework.Bundle installBundle(java.lang.String url) throws org.osgi.framework.BundleException
url
- install location URIorg.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.public org.osgi.framework.Bundle getBundle(java.lang.String name)
name
- bundle symbolic name to look fornull