public interface BatchBundleListener extends BundleListener
BundleEvent
listener.
BatchBundleListener
is a listener interface that may be
implemented by a bundle developer.
A BatchBundleListener
object is registered with the
Framework using the BundleContext.addBundleListener(org.osgi.framework.BundleListener)
method.
BatchBundleListener
objects are called with a
BundleEvent
object when a bundle has been installed, resolved,
started, stopped, updated, unresolved, or uninstalled.
A BatchBundleListener
acts like a BundleListener
except the framework will call the batchBegin()
method at the beginning
of a batch process and call the batchEnd()
at the end of a batch
process. For example, the framework may notify a BatchBundleListener
of a batching process during a refresh packages operation or a resolve bundles
operation.
During a batching operation the framework will continue to deliver any events using
the BundleListener.bundleChanged(BundleEvent)
method to the
BatchBundleListener
. It is the responsiblity of the
BatchBundleListener
to decide how to handle events when a
batching operation is in progress.
Note that the framework does not guarantee that batching operations will not
overlap. This can result in the method batchBegin()
being called
multiple times before the first batchEnd()
is called.
Clients may implement this interface.
BundleEvent
,
BundleListener
Modifier and Type | Method and Description |
---|---|
void |
batchBegin()
Indicates that a batching process has begun.
|
void |
batchEnd()
Indicates that a batching process has ended.
|
bundleChanged
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.