public class SisuTracker extends org.osgi.util.tracker.BundleTracker<java.lang.Object> implements BundlePlan
BundleTracker that tracks component bundles and uses BundlePlans to publish them.| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.Long,java.lang.Object> |
bundlePublishers |
protected MutableBeanLocator |
locator
Shared locator of bound components.
|
private static java.lang.Object |
PLACEHOLDER |
protected java.util.List<BundlePlan> |
plans
Custom plans; contributed by attaching fragments to the extender bundle.
|
protected int |
stateMask
Mask of bundle states being tracked.
|
private static java.util.Set<java.lang.String> |
SUPPORT_BUNDLE_NAMES |
| Constructor and Description |
|---|
SisuTracker(org.osgi.framework.BundleContext context,
int stateMask,
MutableBeanLocator locator) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
addingBundle(org.osgi.framework.Bundle bundle,
org.osgi.framework.BundleEvent event) |
private void |
addPublisher(java.lang.Long bundleId,
BindingPublisher publisher) |
protected java.util.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,
java.lang.Object object) |
private void |
removePublisher(java.lang.Long bundleId) |
private static final java.lang.Object PLACEHOLDER
private static final java.util.Set<java.lang.String> SUPPORT_BUNDLE_NAMES
private static final java.util.Map<java.lang.Long,java.lang.Object> bundlePublishers
protected final int stateMask
protected final MutableBeanLocator locator
protected final java.util.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<java.lang.Object>public final java.lang.Object addingBundle(org.osgi.framework.Bundle bundle,
org.osgi.framework.BundleEvent event)
addingBundle in interface org.osgi.util.tracker.BundleTrackerCustomizer<java.lang.Object>addingBundle in class org.osgi.util.tracker.BundleTracker<java.lang.Object>public final void removedBundle(org.osgi.framework.Bundle bundle,
org.osgi.framework.BundleEvent event,
java.lang.Object object)
removedBundle in interface org.osgi.util.tracker.BundleTrackerCustomizer<java.lang.Object>removedBundle in class org.osgi.util.tracker.BundleTracker<java.lang.Object>public final void purgeBundles()
public BindingPublisher prepare(org.osgi.framework.Bundle bundle)
BundlePlanBindingPublisher of components for the given bundle.prepare in interface BundlePlanbundle - The bundlenull if the plan doesn't applyprotected java.util.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 falseprivate void addPublisher(java.lang.Long bundleId,
BindingPublisher publisher)
private void removePublisher(java.lang.Long bundleId)