|
Service Discovery API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--ServiceDescriptor
Metadata for a service
A service is an application that exposes itself through a Web interface and allows users to view it or interact with it programatically. Objects of this class give you access to information such as the name and description of a service and which URL it is exposed on. This says nothing of the capabilities of the service, so other services will need to know about the internal workings of the service in order to communicate with it.
Services are exposed in a ServiceList object through the DeviceDescriptor.services property.
| Field Summary | |
String |
description
Human-redable description of this service. |
DeviceDescriptor |
device
The device this service belongs to. |
String |
id
Unique identifier for this service. |
Boolean |
isUniteService
Whether this service is an Opera Unite service. |
String |
name
Human-redable name of this service. |
int |
OFFLINE
Constant for whether a service is offline. |
int |
ONLINE
Constant for whether a service is online. |
int |
status
The availability status of this service. |
String |
url
URL this service is exposed on. |
| Constructor Summary | |
ServiceDescriptor()
This class has no public constructor. |
|
| Field Detail |
String description
DeviceDescriptor device
String id
Boolean isUniteService
String name
int OFFLINE
int ONLINE
int status
Typically whether the service is on- or offline. The value of this property is one of ONLINE or OFFLINE. The list of constants expanded may be included in the future to include statuses like "Busy".
Example:
if ( service.status == service.OFFLINE )
{
widget.showNotification(service.name + ' has been disabled.');
}
String url
This URL points to the root of the service. Use it to generate links to the service, or to generate URLs in XHR calls to it.
Example:
a = document.createElement('a');
a.href = service.url;
a.textContent = service.name
| Constructor Detail |
ServiceDescriptor()
|
Service Discovery API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||