Namespace: ServiceType

capsula.ServiceType

The collection of built-in service types of capsula.js module.
Since:
  • 0.1.0
Source:

Members

(static) OPERATION

Service type that enables delivery of requests to an operation of the target capsule. Each service of this type should have the following properties specified in its service config object (the second argument of the service registration register function):

- (string) type - set to capsula.ServiceType.OPERATION
- operation - target operation to which to deliver the package (of requests)
- async - [optional] whether to call target operation synchronously or asynchronously (default async = false)

Source:
Example

Example of ServiceType.OPERATION service

services.register('myOperationService', {
    type: capsula.ServiceType.OPERATION,
    operation: myCapsule.operationX
});