Package org.osgi.service.device
Interface DriverLocator
-
public interface DriverLocatorA Driver Locator service can find and load device driver bundles given a property set. Each driver is represented by a uniqueDRIVER_ID.Driver Locator services provide the mechanism for dynamically downloading new device driver bundles into an OSGi environment. They are supplied by providers and encapsulate all provider-specific details related to the location and acquisition of driver bundles.
- See Also:
Driver
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String[]findDrivers(java.util.Dictionary<java.lang.String,?> props)Returns an array ofDRIVER_IDstrings of drivers capable of attaching to a device with the given properties.java.io.InputStreamloadDriver(java.lang.String id)Get anInputStreamfrom which the driver bundle providing a driver with the givingDRIVER_IDcan be installed.
-
-
-
Method Detail
-
findDrivers
java.lang.String[] findDrivers(java.util.Dictionary<java.lang.String,?> props)
Returns an array ofDRIVER_IDstrings of drivers capable of attaching to a device with the given properties.The property keys in the specified
Dictionaryobjects are case-insensitive.- Parameters:
props- the properties of the device for which a driver is sought- Returns:
- array of driver
DRIVER_IDstrings of drivers capable of attaching to a Device service with the given properties, ornullif this Driver Locator service does not know of any such drivers
-
loadDriver
java.io.InputStream loadDriver(java.lang.String id) throws java.io.IOExceptionGet anInputStreamfrom which the driver bundle providing a driver with the givingDRIVER_IDcan be installed.- Parameters:
id- theDRIVER_IDof the driver that needs to be installed.- Returns:
- An
InputStreamobject from which the driver bundle can be installed ornullif the driver with the given ID cannot be located - Throws:
java.io.IOException- the input stream for the bundle cannot be created
-
-