|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ops4j.pax.swissbox.lifecycle.AbstractLifecycle
org.ops4j.pax.swissbox.extender.BundleWatcher<T>
public class BundleWatcher<T>
Watches bundles life cycle events. Once a bundle becomes active a scanning process will be performed and each bundle resource found during scanning will be registered. Once a bundle stops the registered resources for that bundle will be unregistered. If the bundle watcher is stopped all bundle resources will be unregistered.
Constructor Summary | |
---|---|
BundleWatcher(org.osgi.framework.BundleContext context,
BundleScanner<T> scanner)
Create a new bundle watcher. |
|
BundleWatcher(org.osgi.framework.BundleContext context,
BundleScanner<T> scanner,
BundleObserver<T>... observers)
Create a new bundle watcher. |
Method Summary | |
---|---|
protected void |
onStart()
Registers a listener for bundle events and scans already active bundles. |
protected void |
onStop()
Un-register the bundle listener, releases resources |
Methods inherited from class org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle |
---|
isStarted, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BundleWatcher(org.osgi.framework.BundleContext context, BundleScanner<T> scanner)
context
- a bundle context. Cannot be null.scanner
- a bundle scanner. Cannot be null.public BundleWatcher(org.osgi.framework.BundleContext context, BundleScanner<T> scanner, BundleObserver<T>... observers)
context
- a bundle context. Cannot be null.scanner
- a bundle scanner. Cannot be null.observers
- list of observersMethod Detail |
---|
protected void onStart()
onStart
in class AbstractLifecycle
protected void onStop()
onStop
in class AbstractLifecycle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |