public class

SisuTracker

extends
implements BundlePlan
java.lang.Object
   ↳
     ↳ org.eclipse.sisu.launch.SisuTracker

Class Overview

OSGi BundleTracker that tracks component bundles and uses BundlePlans to publish them.

Summary

Fields
protected final MutableBeanLocator locator Shared locator of bound components.
protected final List<BundlePlan> plans Custom plans; contributed by attaching fragments to the extender bundle.
protected final int stateMask Mask of bundle states being tracked.
Public Constructors
SisuTracker(BundleContext context, int stateMask, MutableBeanLocator locator)
Public Methods
final Object addingBundle(Bundle bundle, BundleEvent event)
final void open()
BindingPublisher prepare(Bundle bundle)
Prepares a BindingPublisher of components for the given bundle.
final void purgeBundles()
Purges any bundles that are no longer valid.
final void removedBundle(Bundle bundle, BundleEvent event, Object object)
Protected Methods
List<BundlePlan> discoverPlans()
Discovers plans listed locally under META-INF/services/org.eclipse.sisu.launch.BundlePlan ; implementations must have a public no-arg constructor or one that accepts a MutableBeanLocator.
boolean evictBundle(Bundle bundle)
Determines whether we should remove the BindingPublisher associated with the given bundle.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.eclipse.sisu.launch.BundlePlan

Fields

protected final MutableBeanLocator locator

Shared locator of bound components.

protected final List<BundlePlan> plans

Custom plans; contributed by attaching fragments to the extender bundle.

protected final int stateMask

Mask of bundle states being tracked.

Public Constructors

public SisuTracker (BundleContext context, int stateMask, MutableBeanLocator locator)

Public Methods

public final Object addingBundle (Bundle bundle, BundleEvent event)

public final void open ()

public BindingPublisher prepare (Bundle bundle)

Prepares a BindingPublisher of components for the given bundle.

Parameters
bundle The bundle
Returns
  • Publisher of bindings; null if the plan doesn't apply

public final void purgeBundles ()

Purges any bundles that are no longer valid.

public final void removedBundle (Bundle bundle, BundleEvent event, Object object)

Protected Methods

protected List<BundlePlan> discoverPlans ()

Discovers plans listed locally under META-INF/services/org.eclipse.sisu.launch.BundlePlan ; implementations must have a public no-arg constructor or one that accepts a MutableBeanLocator.

Returns
  • List of plans

protected boolean evictBundle (Bundle bundle)

Determines whether we should remove the BindingPublisher associated with the given bundle.

Parameters
bundle The bundle
Returns
  • true if the publisher should be removed; otherwise false