Service getRequiredService(DOMString service_name[, isSecure])

Get a required service.

Parameter Description
service_name Name of a service.
isSecure Get unsecure or secure service.

This method returns on success an instance of the Service class. The return value is null If the service_name is not defined in the spacelets open services.

The optional isSecure parameter can be used to define the type of the returned service. Passing false as the value returns unsecure service. Passing true returns secure service. If the parameter is not defined, the service is selected automatically. The selection is based on the following sequence:

1. Return secure service if it is available. 2. If secure service is not available, return unsecure service. 3. If neither of the services is available, return null.

copyright © 2014