The OSGi Device Access Specification.
The Device Manager service listens for new Device services and attaches drivers on top of devices.
The device manager registers as service listener in the framework, detecting all newly installed Device services. For each new Device service, a list of driver bundles are located and installed. Then, all Driver services are located from framework and tested in a bidding phase, where each Driver may inspect the Device service. The highest bidding Driver gets attached to the device.
Device detection Listen for all new Device Services implementing org.osgi.service.device.Device
For each new Device service:
Location phase Use DriverLocators to locate additional drivers
Get all DriverLocator services
Query each DriverLocator for driver IDs by calling locator.findDriver(Device)
Check which drivers are already present in Framework
Load, install, and start new driver bundles by calling locator.loadDriver(driver ID) and Framework.install(stream, driver id)
Get all registered Driver services (implementing org.osgi.service.device.Driver) from Framework.
For each Driver service:
Call the Driver service's match() method with the Device as argument.
Select the highest bidding Driver service
Call the Driver service's attach() method.
If attach() returns null, do nothing more.
If attach() returns a new driver ID, repeat the location phase, but exclude the referring driver from the next match round.
Each driver bundle is expected to have a universally unique string ID. This ID is used by the device manager to resolve driver revisions and is also used as framework location ID.
The Device Manager uses zero or more DriverLocator services to find new driver bundles to install. DriverLocators are typically implementation specific for a specific type of driver databases and network setups.
See Also: DriverLocator
Class Summary | |
---|---|
Interfaces | |
Device | The Device interface should be implemented by services wishing to be discovered by the device manager. |
Driver | A Driver service should be registered by each driver wishing to attach to device services provided by other drivers. |
DriverLocator | A DriverLocator can find and load device driver bundles given a property set. |
3.14.144.108