org.eclipse.gemini.blueprint.extender.internal.dependencies.shutdown
Class ShutdownSorter

java.lang.Object
  extended by org.eclipse.gemini.blueprint.extender.internal.dependencies.shutdown.ShutdownSorter

public abstract class ShutdownSorter
extends Object

Utility for sorting out bundles during shutdown based on the OSGi 4.2 shutdown algorithm. Please see section 121.3.11 in OSGi 4.2 release. Since sorting out the entire graph from the beginning is difficult (shutting down some bundles, might allow others to be destroyed), this utility is meant to be called multiple times until the list is being depleted.

Author:
Costin Leau

Constructor Summary
ShutdownSorter()
           
 
Method Summary
static Collection<org.osgi.framework.Bundle> getBundles(Collection<org.osgi.framework.Bundle> managedBundles)
          Sorts the given bundles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShutdownSorter

public ShutdownSorter()
Method Detail

getBundles

public static Collection<org.osgi.framework.Bundle> getBundles(Collection<org.osgi.framework.Bundle> managedBundles)
Sorts the given bundles. The method extracts the bundles about to be destroyed from the given lists and returns them to the user. Since shutting down a bundle can influence the destruction of the others, this method should be called after all the returned bundles have been destroyed until the list is empty.

Parameters:
managedBundles -
Returns:
sorted collection of Bundles


Copyright © 2006-2013. All Rights Reserved.