How to use the @here/harp-datasource-protocol.WorkerServiceProtocol.WORKER_SERVICE_MANAGER_SERVICE_ID function in @here/harp-datasource-protocol

To help you get started, we’ve selected a few @here/harp-datasource-protocol examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heremaps / harp.gl / @here / harp-mapview / lib / WorkerBasedTiler.ts View on Github external
dispose() {
        if (this.m_serviceCreated) {
            this.workerSet
                .broadcastRequest(WorkerServiceProtocol.WORKER_SERVICE_MANAGER_SERVICE_ID, {
                    type: WorkerServiceProtocol.Requests.DestroyService,
                    targetServiceId: this.serviceId
                })
                .catch(() => {
                    /* Ignoring these errors as underlying workers possibly do not exist anymore. */
                });
        }

        this.workerSet.removeReference();
    }
github heremaps / harp.gl / @here / harp-mapview / lib / WorkerBasedDecoder.ts View on Github external
dispose() {
        if (this.m_serviceCreated) {
            this.workerSet
                .broadcastRequest(WorkerServiceProtocol.WORKER_SERVICE_MANAGER_SERVICE_ID, {
                    type: WorkerServiceProtocol.Requests.DestroyService,
                    targetServiceId: this.serviceId
                })
                .catch(() => {
                    /* Ignoring these errors as underlying workers possibly do not exist anymore. */
                });
        }

        this.workerSet.removeReference();
    }
github heremaps / harp.gl / @here / harp-mapview-decoder / lib / WorkerServiceManager.ts View on Github external
static getInstance() {
        if (this.m_service === undefined) {
            this.m_service = new WorkerServiceManager(
                WorkerServiceProtocol.WORKER_SERVICE_MANAGER_SERVICE_ID
            );
        }
        return this.m_service;
    }
github heremaps / harp.gl / @here / harp-mapview-decoder / lib / WorkerServiceManager.ts View on Github external
private constructor(
        serviceId: string = WorkerServiceProtocol.WORKER_SERVICE_MANAGER_SERVICE_ID
    ) {
        super(serviceId);
    }
github heremaps / harp.gl / @here / harp-mapview / lib / WorkerBasedTiler.ts View on Github external
async connect(): Promise {
        await this.workerSet.connect(WorkerServiceProtocol.WORKER_SERVICE_MANAGER_SERVICE_ID);
        if (!this.m_serviceCreated) {
            await this.workerSet.broadcastRequest(
                WorkerServiceProtocol.WORKER_SERVICE_MANAGER_SERVICE_ID,
                {
                    type: WorkerServiceProtocol.Requests.CreateService,
                    targetServiceType: this.tilerServiceType,
                    targetServiceId: this.serviceId
                }
            );

            this.m_serviceCreated = true;
        }
    }
github heremaps / harp.gl / @here / harp-mapview / lib / WorkerBasedDecoder.ts View on Github external
async connect(): Promise {
        await this.workerSet.connect(WorkerServiceProtocol.WORKER_SERVICE_MANAGER_SERVICE_ID);
        if (!this.m_serviceCreated) {
            await this.workerSet.broadcastRequest(
                WorkerServiceProtocol.WORKER_SERVICE_MANAGER_SERVICE_ID,
                {
                    type: WorkerServiceProtocol.Requests.CreateService,
                    targetServiceType: this.decoderServiceType,
                    targetServiceId: this.serviceId
                }
            );
            this.m_serviceCreated = true;
        }
    }