org.ops4j.pax.radman.service.bundleManager
Interface OSGiBundleManager


public interface OSGiBundleManager

OSGiBundleManager provides management capabilities to install, uninstall and list installed bundles.

Since:
0.1.0
Author:
Edward Yakop

Method Summary
 java.util.List<OSGiBundle> getBundles()
          Returns the installed OSGi bundles.
 void installBundle(java.lang.String anURL, java.lang.Integer aStartLevel)
          Install the OSGi bundle given the bundle url.
 void startBundle(java.lang.String aBundleSymbolicName, java.lang.String aVersion)
          Starts the specified bundle.
 void stopBundle(java.lang.String aBundleSymbolicName, java.lang.String aVersion)
          Stops the specified bundle.
 void uninstallBundle(java.lang.String aBundleSymbolicName, java.lang.String aVersion)
          Uninstall the bundle given the bundle symbolic name and the version.
 

Method Detail

getBundles

java.util.List<OSGiBundle> getBundles()
Returns the installed OSGi bundles.

Returns:
The installed OSGi bundles.
Since:
0.1.0

installBundle

void installBundle(java.lang.String anURL,
                   java.lang.Integer aStartLevel)
                   throws java.lang.IllegalArgumentException,
                          InstallBundleFailException
Install the OSGi bundle given the bundle url.

Parameters:
anURL - The url of the bundle installed. This argument must not be null.
aStartLevel - The bundle start level. Sets to null if the start level should be the default OSGi container start level.
Throws:
java.lang.IllegalArgumentException - Thrown if the specified url is null.
InstallBundleFailException - Thrown if installing the specified bundle fails.
Since:
0.1.0
See Also:
To retrieve the default start level of the {@code OSGi} container.

uninstallBundle

void uninstallBundle(java.lang.String aBundleSymbolicName,
                     java.lang.String aVersion)
                     throws java.lang.IllegalArgumentException,
                            UninstallBundleFailException
Uninstall the bundle given the bundle symbolic name and the version.

Parameters:
aBundleSymbolicName - The bundle symbolic name. This argument must not be null.
aVersion - The bundle version. This argument must not be null.
Throws:
java.lang.IllegalArgumentException - Thrown if one or both arguments are null.
UninstallBundleFailException - Thrown if uninstalling the specified bundle fails.
BundleNotFoundException - Thrown if the requested bundle is not found.
Since:
0.1.0

startBundle

void startBundle(java.lang.String aBundleSymbolicName,
                 java.lang.String aVersion)
                 throws java.lang.IllegalArgumentException,
                        BundleNotFoundException,
                        BundleStartFailException
Starts the specified bundle.

Parameters:
aBundleSymbolicName - The bundle symbolic name. This argument must not be null.
aVersion - The bundle version. This argument must not be null.
Throws:
java.lang.IllegalArgumentException - Thrown if one or both arguments are null.
BundleNotFoundException - Thrown if the requested bundle is not found.
BundleStartFailException - Thrown if the requested bundle fail to start.
Since:
0.1.0

stopBundle

void stopBundle(java.lang.String aBundleSymbolicName,
                java.lang.String aVersion)
                throws java.lang.IllegalArgumentException,
                       BundleNotFoundException,
                       BundleStopFailException
Stops the specified bundle.

Parameters:
aBundleSymbolicName - The bundle symbolic name. This argument must not be null.
aVersion - The bundle version. This argument must not be null.
Throws:
java.lang.IllegalArgumentException - Thrown if one or both arguments are null.
BundleNotFoundException - Thrown if the requested bundle is not found.
BundleStopFailException - Thrown if the requested bundle fail to stop.
Since:
0.1.0


Copyright © 2008. All Rights Reserved.