public interface Device
Device
services are registered last. Before their registration, there is
Function
services registration. The reverse order is used when the
services are unregistered. Device
services are unregistered first
before Function
services.Modifier and Type | Field and Description |
---|---|
static String |
DEVICE_CATEGORY
Constant for the value of the
Constants.DEVICE_CATEGORY service
property. |
static String |
SERVICE_DESCRIPTION
The service property value contains the device description.
|
static String |
SERVICE_DRIVER
The service property value contains the device driver name.
|
static String |
SERVICE_FIRMWARE_VENDOR
The service property value contains the device firmware vendor.
|
static String |
SERVICE_FIRMWARE_VERSION
The service property value contains the device firmware version.
|
static String |
SERVICE_HARDWARE_VENDOR
The service property value contains the device hardware vendor.
|
static String |
SERVICE_HARDWARE_VERSION
The service property value contains the device hardware version.
|
static String |
SERVICE_MODEL
The service property value contains the device model.
|
static String |
SERVICE_NAME
The service property value contains the device name.
|
static String |
SERVICE_REFERENCE_UIDS
The service property value contains the reference device unique
identifiers.
|
static String |
SERVICE_SERIAL_NUMBER
The service property value contains the device serial number.
|
static String |
SERVICE_STATUS
The service property value contains the device status.
|
static String |
SERVICE_STATUS_DETAIL
The service property value contains the device status detail.
|
static String |
SERVICE_TYPES
The service property value contains the device types like DVD, TV, etc.
|
static String |
SERVICE_UID
The service property value contains the device unique identifier.
|
static Integer |
STATUS_DETAIL_BROKEN
Device status detail indicates that the device is broken.
|
static Integer |
STATUS_DETAIL_COMMUNICATION_ERROR
Device status detail indicates that the device communication is
problematic.
|
static Integer |
STATUS_DETAIL_CONFIGURATION_ERROR
Device status detail indicates that the device cannot be configured.
|
static Integer |
STATUS_DETAIL_CONFIGURATION_UNAPPLIED
Device status detail indicates that the device configuration is not
applied.
|
static Integer |
STATUS_DETAIL_CONNECTING
Device status detail indicates that the device is currently connecting to
the network.
|
static Integer |
STATUS_DETAIL_DATA_INSUFFICIENT
Device status detail indicates that the device doesn't provide enough
information and cannot be determined.
|
static Integer |
STATUS_DETAIL_DUTY_CYCLE
Device status detail indicates that the device is in duty cycle.
|
static Integer |
STATUS_DETAIL_FIRMWARE_UPDATING
Device status detail indicates that the device firmware is updating.
|
static Integer |
STATUS_DETAIL_INACCESSIBLE
Device status detail indicates that the device is not accessible and
further communication is not possible.
|
static Integer |
STATUS_DETAIL_INITIALIZING
Device status detail indicates that the device is currently in process of
initialization.
|
static Integer |
STATUS_DETAIL_REMOVING
Device status detail indicates that the device is leaving the network.
|
static Integer |
STATUS_NOT_CONFIGURED
Device status indicates that the device is currently not configured.
|
static Integer |
STATUS_NOT_INITIALIZED
Device status indicates that the device is currently not initialized.
|
static Integer |
STATUS_OFFLINE
Device status indicates that the device is currently not available for
operations.
|
static Integer |
STATUS_ONLINE
Device status indicates that the device is currently available for
operations.
|
static Integer |
STATUS_PROCESSING
Device status indicates that the device is currently busy with an
operation.
|
static Integer |
STATUS_REMOVED
Device status indicates that the device has been removed from the
network.
|
Modifier and Type | Method and Description |
---|---|
Object |
getServiceProperty(String propKey)
Returns the current value of the specified property.
|
String[] |
getServicePropertyKeys()
Returns an array with all device service property keys.
|
void |
remove()
Removes this device.
|
static final String DEVICE_CATEGORY
Constants.DEVICE_CATEGORY
service
property. That category is used by all device services.static final String SERVICE_UID
java.lang.String
. To
simplify the unique identifier generation, the property value must follow
the rule:
UID ::= driver-name ':' device-id
UID - device unique identifier
driver-name - the value of the SERVICE_DRIVER
service property
device-id - device unique identifier in the scope of the driver
static final String SERVICE_REFERENCE_UIDS
java.lang.String[]
. It can be used to represent different
relationships between the devices. For example, the EnOcean controller
can have a reference to the USB dongle.static final String SERVICE_DRIVER
java.lang.String
.static final String SERVICE_NAME
java.lang.String
.static final String SERVICE_STATUS
java.lang.Integer
. The possible
values are:
static final String SERVICE_STATUS_DETAIL
java.lang.Integer
. There are two value categories:
STATUS_DETAIL_CONNECTING
and
STATUS_DETAIL_INITIALIZING
.STATUS_DETAIL_CONFIGURATION_UNAPPLIED
,
STATUS_DETAIL_BROKEN
and
STATUS_DETAIL_COMMUNICATION_ERROR
.static final String SERVICE_HARDWARE_VENDOR
java.lang.String
.static final String SERVICE_HARDWARE_VERSION
java.lang.String
.static final String SERVICE_FIRMWARE_VENDOR
java.lang.String
.static final String SERVICE_FIRMWARE_VERSION
java.lang.String
.static final String SERVICE_TYPES
java.lang.String[]
.static final String SERVICE_MODEL
java.lang.String
.static final String SERVICE_SERIAL_NUMBER
java.lang.String
.static final String SERVICE_DESCRIPTION
java.lang.String
.static final Integer STATUS_REMOVED
SERVICE_STATUS
service property.static final Integer STATUS_OFFLINE
SERVICE_STATUS
service
property.static final Integer STATUS_ONLINE
SERVICE_STATUS
service
property.static final Integer STATUS_PROCESSING
SERVICE_STATUS
service
property.static final Integer STATUS_NOT_INITIALIZED
SERVICE_STATUS
service property.static final Integer STATUS_NOT_CONFIGURED
SERVICE_STATUS
service
property.static final Integer STATUS_DETAIL_CONNECTING
SERVICE_STATUS_DETAIL
service property. The device status must be STATUS_PROCESSING
.static final Integer STATUS_DETAIL_INITIALIZING
SERVICE_STATUS_DETAIL
service property. The device status must
be STATUS_PROCESSING
.static final Integer STATUS_DETAIL_REMOVING
SERVICE_STATUS_DETAIL
service
property. The device status must be STATUS_PROCESSING
.static final Integer STATUS_DETAIL_FIRMWARE_UPDATING
SERVICE_STATUS_DETAIL
service
property. The device status must be STATUS_PROCESSING
.static final Integer STATUS_DETAIL_CONFIGURATION_UNAPPLIED
SERVICE_STATUS_DETAIL
service property. The device status must be
STATUS_NOT_CONFIGURED
.static final Integer STATUS_DETAIL_BROKEN
SERVICE_STATUS_DETAIL
service property. The device
status must be STATUS_OFFLINE
.static final Integer STATUS_DETAIL_COMMUNICATION_ERROR
SERVICE_STATUS_DETAIL
service property. The device status must be STATUS_ONLINE
or
STATUS_NOT_INITIALIZED
.static final Integer STATUS_DETAIL_DATA_INSUFFICIENT
SERVICE_STATUS_DETAIL
service property. The device status must
be STATUS_NOT_INITIALIZED
.static final Integer STATUS_DETAIL_INACCESSIBLE
SERVICE_STATUS_DETAIL
service property. The device status must
be STATUS_OFFLINE
.static final Integer STATUS_DETAIL_CONFIGURATION_ERROR
SERVICE_STATUS_DETAIL
service
property. The device status must be STATUS_NOT_CONFIGURED
.static final Integer STATUS_DETAIL_DUTY_CYCLE
SERVICE_STATUS_DETAIL
service property.
The device status must be STATUS_OFFLINE
.Object getServiceProperty(String propKey)
ServiceReference.getProperty(String)
for
the service reference of this device.
This method must continue to return property values after the device service has been unregistered.
propKey
- The property key.null
if the property key cannot be
mapped to a value.String[] getServicePropertyKeys()
ServiceReference.getPropertyKeys()
for
the service reference of this device. The result cannot be null
.null
.void remove() throws DeviceException
The method must synchronously:
STATUS_REMOVED
.DeviceException
- If an operation error is available.UnsupportedOperationException
- If the operation is not supported
over this device.SecurityException
- If the caller does not have the appropriate
DevicePermission(this device,
DevicePermission.REMOVE
)
and the Java Runtime
Environment supports permissions.IllegalStateException
- If this device service object has already
been unregistered.Copyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0