Interface AllServiceListener
-
- All Superinterfaces:
java.util.EventListener,ServiceListener
- All Known Implementing Classes:
ServiceTracker.AllTracked
- 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 AllServiceListener extends ServiceListener
AServiceEventlistener that does not filter based upon package wiring.AllServiceListeneris a listener interface that may be implemented by a bundle developer. When aServiceEventis fired, it is synchronously delivered to anAllServiceListener. The Framework may deliverServiceEventobjects to anAllServiceListenerout of order and may concurrently call and/or reenter anAllServiceListener.An
AllServiceListenerobject is registered with the Framework using theBundleContext.addServiceListenermethod.AllServiceListenerobjects are called with aServiceEventobject when a service is registered, modified, or is in the process of unregistering.ServiceEventobject delivery toAllServiceListenerobjects is filtered by the filter specified when the listener was registered. If the Java Runtime Environment supports permissions, then additional filtering is done.ServiceEventobjects are only delivered to the listener if the bundle which defines the listener object's class has the appropriateServicePermissionto get the service using at least one of the named classes under which the service was registered.Unlike normal
ServiceListenerobjects,AllServiceListenerobjects receive allServiceEventobjects regardless of whether the package source of the listening bundle is equal to the package source of the bundle that registered the service. This means that the listener may not be able to cast the service object to any of its corresponding service interfaces if the service object is retrieved.- Since:
- 1.3
- See Also:
ServiceEvent,ServicePermission
-
-
Method Summary
-
Methods inherited from interface org.osgi.framework.ServiceListener
serviceChanged
-
-