Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright (c) OSGi Alliance (2008, 2012). All Rights Reserved.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.osgi.framework.hooks.service;
OSGi Framework Service Find Hook Service.

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

$Id: 45612d6a10a25ca0b40ba695eb8dba21c2c78c24 $
public interface FindHook {
Find hook method. This method is called during the service find operation (for example, org.osgi.framework.BundleContext.getServiceReferences(java.lang.String,java.lang.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 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 org.osgi.framework.BundleContext.getAllServiceReferences(java.lang.String,java.lang.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.
	void find(BundleContext contextString nameString filterboolean allServicesCollection<ServiceReference<?>> references);
New to GrepCode? Check out our FAQ X