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(org.osgi.framework.Bundle frameworkBundle)
          Gets the BundleFramework object associated with the given bundle
 BundleFramework getSharedBundleFramework()
          Gets a reference to the single shared bundle framework.
 org.osgi.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<org.osgi.framework.Bundle> installSharedBundles(Collection<BundleRepository.BundleSuggestion> bundlesToInstall, AriesApplication app)
          Installs a collection of shared bundles to the shared bundle framework
 void startBundle(org.osgi.framework.Bundle b)
          Starts a previously installed bundle
 void stopBundle(org.osgi.framework.Bundle b)
          Stops a previously installed bundle
 void uninstallBundle(org.osgi.framework.Bundle b)
          Removes a bundle from the runtime
 void updateBundles(DeploymentMetadata newMetadata, DeploymentMetadata oldMetadata, AriesApplication app, BundleFrameworkManager.BundleLocator locator, Set<org.osgi.framework.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(org.osgi.framework.Bundle frameworkBundle)
Gets the BundleFramework object associated with the given bundle

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

getSharedBundleFramework

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

Returns:

installIsolatedBundles

org.osgi.framework.Bundle installIsolatedBundles(Collection<BundleRepository.BundleSuggestion> bundlesToInstall,
                                                 AriesApplication app)
                                                 throws org.osgi.framework.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:
Throws:
org.osgi.framework.BundleException

installSharedBundles

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

Parameters:
bundlesToInstall -
app -
Returns:
Throws:
org.osgi.framework.BundleException

allowsUpdate

boolean allowsUpdate(DeploymentMetadata newMetadata,
                     DeploymentMetadata oldMetadata)

updateBundles

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

startBundle

void startBundle(org.osgi.framework.Bundle b)
                 throws org.osgi.framework.BundleException
Starts a previously installed bundle

Parameters:
b -
Throws:
org.osgi.framework.BundleException

stopBundle

void stopBundle(org.osgi.framework.Bundle b)
                throws org.osgi.framework.BundleException
Stops a previously installed bundle

Parameters:
b -
Throws:
org.osgi.framework.BundleException

uninstallBundle

void uninstallBundle(org.osgi.framework.Bundle b)
                     throws org.osgi.framework.BundleException
Removes a bundle from the runtime

Parameters:
b -
Throws:
org.osgi.framework.BundleException


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