A synchronous {@code BundleEvent} listener. {@code SynchronousBundleListener}is a listener interface that may be implemented by a bundle developer. When a {@code BundleEvent} is fired, it is synchronously delivered to a{@code SynchronousBundleListener}. The Framework may deliver {@code BundleEvent} objects to a {@code SynchronousBundleListener} out oforder and may concurrently call and/or reenter a {@code SynchronousBundleListener}.
For {@code BundleEvent} types {@link BundleEvent#STARTED STARTED} and{@link BundleEvent#LAZY_ACTIVATION LAZY_ACTIVATION}, the Framework must not hold the referenced bundle's "state change" lock when the {@code BundleEvent} is delivered to a {@code SynchronousBundleListener}. For the other {@code BundleEvent} types, the Framework must hold the referencedbundle's "state change" lock when the {@code BundleEvent} isdelivered to a {@code SynchronousBundleListener}. A {@code SynchronousBundleListener} cannot directly call life cycle methods onthe referenced bundle when the Framework is holding the referenced bundle's "state change" lock.
A {@code SynchronousBundleListener} object is registered with the Frameworkusing the {@link BundleContext#addBundleListener(BundleListener)} method.{@code SynchronousBundleListener} objects are called with a{@code BundleEvent} object when a bundle has been installed, resolved,starting, started, stopping, stopped, updated, unresolved, or uninstalled.
Unlike normal {@code BundleListener} objects,{@code SynchronousBundleListener}s are synchronously called during bundle lifecycle processing. The bundle lifecycle processing will not proceed until all {@code SynchronousBundleListener}s have completed. {@code SynchronousBundleListener} objects will be called prior to{@code BundleListener} objects.
{@code AdminPermission[bundle,LISTENER]} is required to add or remove a{@code SynchronousBundleListener} object.
@since 1.1
@see BundleEvent
@ThreadSafe
@author $Id: 6b50c6c9d8b8b091928495eb036552773284b13a $