Top Description Methods
org.osgi.service.device

public Interface DriverLocator

Imports
java.io.IOException, .InputStream, java.util.Dictionary

A Driver Locator service can find and load device driver bundles given a property set. Each driver is represented by a unique DRIVER_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.

Author
$Id: 4a1bbd224b427a994c799b2d2bb14301a475b7f2 $
See Also
Driver

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

array of driver DRIVER_ID strings of drivers capable of attaching to a Device service with the given properties, or null if this Driver Locator service does not know of any such drivers
findDrivers
(Dictionary<String, ?>
the properties of the device for which a driver is sought
props
)

Returns an array of DRIVER_ID strings of drivers capable of attaching to a device with the given properties.

public InputStream

Returns:

An InputStream object from which the driver bundle can be installed or null if the driver with the given ID cannot be located
loadDriver
(String
the DRIVER_ID of the driver that needs to be installed.
id
)

Get an InputStream from which the driver bundle providing a driver with the giving DRIVER_ID can be installed.

Method Detail

findDriversback to summary
public String[] findDrivers(Dictionary<String, ?> props)

Returns an array of DRIVER_ID strings of drivers capable of attaching to a device with the given properties.

The property keys in the specified Dictionary objects are case-insensitive.

Parameters
props:Dictionary<String, ?>

the properties of the device for which a driver is sought

Returns:String[]

array of driver DRIVER_ID strings of drivers capable of attaching to a Device service with the given properties, or null if this Driver Locator service does not know of any such drivers

loadDriverback to summary
public InputStream loadDriver(String id) throws IOException

Get an InputStream from which the driver bundle providing a driver with the giving DRIVER_ID can be installed.

Parameters
id:String

the DRIVER_ID of the driver that needs to be installed.

Returns:InputStream

An InputStream object from which the driver bundle can be installed or null if the driver with the given ID cannot be located

Exceptions
IOException:
the input stream for the bundle cannot be created