Interface SynchronousBundleListener
-
- All Superinterfaces:
BundleListener,java.util.EventListener
- All Known Implementing Classes:
BundleTracker.Tracked
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@ConsumerType @FunctionalInterface public interface SynchronousBundleListener extends BundleListener
A synchronousBundleEventlistener.SynchronousBundleListeneris a listener interface that may be implemented by a bundle developer. When aBundleEventis fired, it is synchronously delivered to aSynchronousBundleListener. The Framework may deliverBundleEventobjects to aSynchronousBundleListenerout of order and may concurrently call and/or reenter aSynchronousBundleListener.For
BundleEventtypesSTARTEDandLAZY_ACTIVATION, the Framework must not hold the referenced bundle's "state change" lock when theBundleEventis delivered to aSynchronousBundleListener. For the otherBundleEventtypes, the Framework must hold the referenced bundle's "state change" lock when theBundleEventis delivered to aSynchronousBundleListener. ASynchronousBundleListenercannot directly call life cycle methods on the referenced bundle when the Framework is holding the referenced bundle's "state change" lock.A
SynchronousBundleListenerobject is registered with the Framework using theBundleContext.addBundleListener(BundleListener)method.SynchronousBundleListenerobjects are called with aBundleEventobject when a bundle has been installed, resolved, starting, started, stopping, stopped, updated, unresolved, or uninstalled.Unlike normal
BundleListenerobjects,SynchronousBundleListeners are synchronously called during bundle lifecycle processing. The bundle lifecycle processing will not proceed until allSynchronousBundleListeners have completed.SynchronousBundleListenerobjects will be called prior toBundleListenerobjects.AdminPermission[bundle,LISTENER]is required to add or remove aSynchronousBundleListenerobject.- Since:
- 1.1
- See Also:
BundleEvent
-
-
Method Summary
-
Methods inherited from interface org.osgi.framework.BundleListener
bundleChanged
-
-