org.apache.aries.application.management.spi.framework
Interface BundleFrameworkManager


public interface BundleFrameworkManager


Nested Class Summary
static interface BundleFrameworkManager.BundleLocator
           
 
Field Summary
static Object SHARED_FRAMEWORK_LOCK
          All additions/removals of frameworks and bundles from the shared bundle framework are performed under this object lock.
 
Method Summary
 boolean allowsUpdate(DeploymentMetadata newMetadata, DeploymentMetadata oldMetadata)
           
 BundleFramework getBundleFramework(Bundle frameworkBundle)
          Gets the BundleFramework object associated with the given bundle
 BundleFramework getSharedBundleFramework()
          Gets a reference to the single shared bundle framework.
 Bundle installIsolatedBundles(Collection<BundleRepository.BundleSuggestion> bundlesToInstall, AriesApplication app)
          Creates a new framework inside the shared bundle framework and installs a collection of bundles into the framework.
 Collection<Bundle> installSharedBundles(Collection<BundleRepository.BundleSuggestion> bundlesToInstall, AriesApplication app)
          Installs a collection of shared bundles to the shared bundle framework
 void startBundle(Bundle b)
          Starts a previously installed bundle
 void stopBundle(Bundle b)
          Stops a previously installed bundle
 void uninstallBundle(Bundle b)
          Removes a bundle from the runtime
 void updateBundles(DeploymentMetadata newMetadata, DeploymentMetadata oldMetadata, AriesApplication app, BundleFrameworkManager.BundleLocator locator, Set<Bundle> bundles, boolean startBundles)
           
 

Field Detail

SHARED_FRAMEWORK_LOCK

static final Object SHARED_FRAMEWORK_LOCK
All additions/removals of frameworks and bundles from the shared bundle framework are performed under this object lock. Users bypassing this api and performing operations on the underlying OSGi frameworks should be sure to hold this lock.

Method Detail

getBundleFramework

BundleFramework getBundleFramework(Bundle frameworkBundle)
Gets the BundleFramework object associated with the given bundle

Parameters:
frameworkBundle - - The bundle representing the bundle framework
Returns:
the bundle framework

getSharedBundleFramework

BundleFramework getSharedBundleFramework()
Gets a reference to the single shared bundle framework. The Shared Bundle Framework contains bundle shared between applications

Returns:
the shared bundle framework

installIsolatedBundles

Bundle installIsolatedBundles(Collection<BundleRepository.BundleSuggestion> bundlesToInstall,
                              AriesApplication app)
                              throws BundleException
Creates a new framework inside the shared bundle framework and installs a collection of bundles into the framework.

Parameters:
bundlesToInstall - The collection of bundles to be installed
app - The application associated with this install
Returns:
the bundle of the framework
Throws:
BundleException

installSharedBundles

Collection<Bundle> installSharedBundles(Collection<BundleRepository.BundleSuggestion> bundlesToInstall,
                                        AriesApplication app)
                                        throws BundleException
Installs a collection of shared bundles to the shared bundle framework

Parameters:
bundlesToInstall -
app -
Returns:
the collection of installed bundles.
Throws:
BundleException

allowsUpdate

boolean allowsUpdate(DeploymentMetadata newMetadata,
                     DeploymentMetadata oldMetadata)

updateBundles

void updateBundles(DeploymentMetadata newMetadata,
                   DeploymentMetadata oldMetadata,
                   AriesApplication app,
                   BundleFrameworkManager.BundleLocator locator,
                   Set<Bundle> bundles,
                   boolean startBundles)
                   throws UpdateException
Throws:
UpdateException

startBundle

void startBundle(Bundle b)
                 throws BundleException
Starts a previously installed bundle

Parameters:
b -
Throws:
BundleException

stopBundle

void stopBundle(Bundle b)
                throws BundleException
Stops a previously installed bundle

Parameters:
b -
Throws:
BundleException

uninstallBundle

void uninstallBundle(Bundle b)
                     throws BundleException
Removes a bundle from the runtime

Parameters:
b -
Throws:
BundleException


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.