OSGi™ Service Platform
Release 4 Version 4.2

org.osgi.framework.hooks.service
Interface FindHook


public interface FindHook

OSGi Framework Service Find Hook Service.

Bundles registering this service will be called during framework service find (get service references) operations.

ThreadSafe

Method Summary
 void find(BundleContext context, java.lang.String name, java.lang.String filter, boolean allServices, java.util.Collection references)
          Find hook method.
 

Method Detail

find

void find(BundleContext context,
          java.lang.String name,
          java.lang.String filter,
          boolean allServices,
          java.util.Collection references)
Find hook method. This method is called during the service find operation (for example, BundleContext.getServiceReferences(String, String) ). This method can filter the result of the find operation.

Parameters:
context - The bundle context of the bundle performing the find operation.
name - The class name of the services to find or null to find all services.
filter - The filter criteria of the services to find or null for no filter criteria.
allServices - true if the find operation is the result of a call to BundleContext.getAllServiceReferences(String, String)
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 Collection operations except add and addAll. Attempting to add to the collection will result in an UnsupportedOperationException. The collection is not synchronized.

OSGi™ Service Platform
Release 4 Version 4.2

Copyright © OSGi Alliance (2000, 2010). All Rights Reserved. Licensed under the OSGi Specification License, Version 1.0