INDEX

getService(DOMString service_name, DOMString unique_name, Function callback)

Get a provided service object either by service name or by service name and applications or spacelets unique name. The service names are not unique among the installed applications and spacelets in the edge node. If the unique_name parameter is not given the first mathing service is returned. The unique name is therefore required if the service needs to be from some specific application.

The Security model dictates which services are available to the caller of this method. If the service is not in the permitted list an error is returned.

Parameter type
service_name Service name belonging to an application or a spacelet.
unique_name Unique name of an application or a spacelet. Leave this empty if the application or spacelet implementing the service is not important.
callback User defined callback function that is called after the response is available.

After the response is available the callback function is called with two arguments: callback(err, data).

Argument Type Desription
err JSON Object An error_object or null if no error occured.
data JSON Object A service object.
Close
copyright © Spaceify.org 2014