Builds a named JavaScript service that this app publishes for other apps to call. Obtained from newServiceBuilder on the controller mappings. Set the service object, which is a plain JavaScript object of functions, then call build to publish it. Under the version 2.0 engine the service is also stored per thread, so each Graal context gets its own copy of the object.

Group: Builders


Properties

PropertyReturnsDescription
nameStringName other apps look this service up by.
serviceObjectMap<String,Object>The JavaScript object whose functions make up the service.

Methods

getName()

Returns: String

Name other apps look this service up by.

getServiceObject()

Returns: Map<String,Object>

The JavaScript object whose functions make up the service.

serviceObject(Map<String,Object> o)

Returns: JsServiceBuilder

Sets the JavaScript object whose functions make up the service.

ParameterDescription
othe service object, a map of function name to function

build()

Returns: void

Publishes the service under its name so other apps can call it. Under the version 2.0 engine the service is registered in the thread local map as well as the shared one.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.