ServiceMessageBroker

class experimental

npm Package @angular/platform-webworker
Module import { ServiceMessageBroker } from '@angular/platform-webworker';
Source platform-webworker/src/web_workers/shared/service_message_broker.ts

Overview

class ServiceMessageBroker {
  registerMethod(methodName: string, signature: Array<Type<any>|SerializerTypes>|null, method: Function, returnType?: Type<any>|SerializerTypes): void
}

Description

Helper class for UIComponents that allows components to register methods. If a registered method message is received from the broker on the worker, the UIMessageBroker deserializes its arguments and calls the registered method. If that method returns a promise, the UIMessageBroker returns the result to the worker.

Members

registerMethod(methodName: string, signature: Array<Type<any>|SerializerTypes>|null, method: Function, returnType?: Type<any>|SerializerTypes): void

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v4.angular.io/api/platform-webworker/ServiceMessageBroker