public interface DriverService extends DriverRegistry
Modifier and Type | Method and Description |
---|---|
DriverHandler |
createHandler(DeviceId deviceId,
java.lang.String... credentials)
Creates a new driver handler for interacting with the specified device.
|
Driver |
getDriver(DeviceId deviceId)
Returns the driver for the specified device.
|
java.util.Set<Driver> |
getDrivers()
Returns the overall set of drivers being provided.
|
java.util.Set<Driver> |
getDrivers(java.lang.Class<? extends Behaviour> withBehaviour)
Returns the set of drivers which support the specified behaviour.
|
getDriver
getDriver
addListener, removeListener
java.util.Set<Driver> getDrivers()
getDrivers
in interface DriverRegistry
java.util.Set<Driver> getDrivers(java.lang.Class<? extends Behaviour> withBehaviour)
withBehaviour
- behaviour class to query byDriver getDriver(DeviceId deviceId)
driver
annotation, its value is used to look-up the driver.
Otherwise, the device manufacturer, hardware and software version
attributes are used to look-up the driver. First using their literal
values and if no driver is found, using ERE matching against the
driver manufacturer, hardware and software version fields.deviceId
- device identifierItemNotFoundException
- if device or driver for it
are not foundDriverHandler createHandler(DeviceId deviceId, java.lang.String... credentials)
getDriver(DeviceId)
method.deviceId
- device identifiercredentials
- optional login credentials in string formItemNotFoundException
- if device or driver for it
are not found