Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright (c) OSGi Alliance (2001, 2013). 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.service.device;
When the device manager detects a new Device service, it calls all registered Driver services to determine if anyone matches the Device service. If at least one Driver service matches, the device manager must choose one. If there is a Driver Selector service registered with the Framework, the device manager will ask it to make the selection. If there is no Driver Selector service, or if it returns an invalid result, or throws an Exception, the device manager uses the default selection strategy.

$Id: 179ecc7fc79d13bbf5d829d64b69baccd58c4b93 $
public interface DriverSelector {
Return value from, if no Driver service should be attached to the Device service. The value is -1.
	public static final int	SELECT_NONE	= -1;

Select one of the matching Driver services. The device manager calls this method if there is at least one driver bidding for a device. Only Driver services that have responded with nonzero (not Device.MATCH_NONE) match values will be included in the list.

reference the ServiceReference object of the Device service.
matches the array of all non-zero matches.
index into the array of Match objects, or SELECT_NONE if no Driver service should be attached
	public int select(ServiceReference referenceMatch[] matches);
New to GrepCode? Check out our FAQ X