@ConsumerType public interface FindHook
Bundles registering this service will be called during framework service find (get service references) operations.
void find(BundleContext context, java.lang.String name, java.lang.String filter, boolean allServices, java.util.Collection<ServiceReference<?>> references)
BundleContext.getServiceReferences(String, String)). This method can filter the result of the find operation.
context- The bundle context of the bundle performing the find operation.
name- The class name of the services to find or
nullto find all services.
filter- The filter criteria of the services to find or
nullfor no filter criteria.
trueif the find operation is the result of a call to
references- A collection of Service References to be returned as a result of the find operation. The implementation of this method may remove service references from the collection to prevent the references from being returned to the bundle performing the find operation. The collection supports all the optional
addAll. Attempting to add to the collection will result in an
UnsupportedOperationException. The collection is not synchronized.
Copyright © OSGi Alliance (2000, 2020). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0