1 /* 2 * $Header: /cvshome/build/org.osgi.service.device/src/org/osgi/service/device/Device.java,v 1.10 2006/07/11 00:54:08 hargrave Exp $ 3 * 4 * Copyright (c) OSGi Alliance (2000, 2006). All Rights Reserved. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 package org.osgi.service.device; 19 20 /** 21 * <p> 22 * Interface for identifying device services. 23 * 24 * <p> 25 * A service must implement this interface or use the 26 * {@link Constants#DEVICE_CATEGORY} registration property to indicate that it 27 * is a device. Any services implementing this interface or registered with the 28 * <code>DEVICE_CATEGORY</code> property will be discovered by the device manager. 29 * 30 * <p> 31 * Device services implementing this interface give the device manager the 32 * opportunity to indicate to the device that no drivers were found that could 33 * (further) refine it. In this case, the device manager calls the 34 * {@link #noDriverFound} method on the <code>Device</code> object. 35 * 36 * <p> 37 * Specialized device implementations will extend this interface by adding 38 * methods appropriate to their device category to it. 39 * 40 * @version $Revision: 1.10 $ 41 * @see Driver 42 */ 43 public interface Device { 44 /** 45 * Return value from {@link Driver#match} indicating that the driver cannot 46 * refine the device presented to it by the device manager. 47 * 48 * The value is zero. 49 */ 50 public static final int MATCH_NONE = 0; 51 52 /** 53 * Indicates to this <code>Device</code> object that the device manager has 54 * failed to attach any drivers to it. 55 * 56 * <p> 57 * If this <code>Device</code> object can be configured differently, the 58 * driver that registered this <code>Device</code> object may unregister it 59 * and register a different Device service instead. 60 */ 61 public void noDriverFound(); 62 } 63