public class SisuTracker extends org.osgi.util.tracker.BundleTracker implements BundlePlan
BundleTracker
that tracks component bundles and uses BundlePlan
s to publish them.Modifier and Type | Field and Description |
---|---|
protected MutableBeanLocator |
locator
Shared locator of bound components.
|
protected List<BundlePlan> |
plans
Custom plans; contributed by attaching fragments to the extender bundle.
|
protected int |
stateMask
Mask of bundle states being tracked.
|
Constructor and Description |
---|
SisuTracker(org.osgi.framework.BundleContext context,
int stateMask,
MutableBeanLocator locator) |
Modifier and Type | Method and Description |
---|---|
Object |
addingBundle(org.osgi.framework.Bundle bundle,
org.osgi.framework.BundleEvent event) |
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 . |
protected boolean |
evictBundle(org.osgi.framework.Bundle bundle)
Determines whether we should remove the
BindingPublisher associated with the given bundle. |
void |
open() |
BindingPublisher |
prepare(org.osgi.framework.Bundle bundle)
Prepares a
BindingPublisher of components for the given bundle. |
void |
purgeBundles()
Purges any bundles that are no longer valid.
|
void |
removedBundle(org.osgi.framework.Bundle bundle,
org.osgi.framework.BundleEvent event,
Object object) |
protected final int stateMask
protected final MutableBeanLocator locator
protected final List<BundlePlan> plans
public SisuTracker(org.osgi.framework.BundleContext context, int stateMask, MutableBeanLocator locator)
public final void open()
open
in class org.osgi.util.tracker.BundleTracker
public final Object addingBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event)
addingBundle
in interface org.osgi.util.tracker.BundleTrackerCustomizer
addingBundle
in class org.osgi.util.tracker.BundleTracker
public final void removedBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event, Object object)
removedBundle
in interface org.osgi.util.tracker.BundleTrackerCustomizer
removedBundle
in class org.osgi.util.tracker.BundleTracker
public final void purgeBundles()
public BindingPublisher prepare(org.osgi.framework.Bundle bundle)
BundlePlan
BindingPublisher
of components for the given bundle.prepare
in interface BundlePlan
bundle
- The bundlenull
if the plan doesn't applyprotected List<BundlePlan> discoverPlans()
META-INF/services/org.eclipse.sisu.launch.BundlePlan
;
implementations must have a public no-arg constructor or one that accepts a MutableBeanLocator
.protected boolean evictBundle(org.osgi.framework.Bundle bundle)
BindingPublisher
associated with the given bundle.bundle
- The bundletrue
if the publisher should be removed; otherwise false
Copyright © 2016. All rights reserved.