Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 67x 67x 67x 67x 67x 41x 41x 67x 67x 67x 41x 41x 1x 1x 41x 41x 82x 66x 66x 66x 82x 41x 41x 13x 13x 41x 41x 2x 2x 41x 41x 79x 79x 79x 41x 41x 10x 10x 41x 41x 181x 181x 181x 181x 41x 41x 5x 5x 41x 41x 2x 2x 41x 41x 27x 27x 27x 27x 41x 41x 4x 3x 3x 4x 4x 4x 4x 4x 4x 4x 20x 4x 4x 4x 4x 4x 41x 41x 2x 2x 41x 41x 2x 2x 41x 41x 18x 18x 41x 41x 165x 165x 41x 41x 41x 41x 1x 1x 41x 41x 4x 4x 41x 41x 3x 3x 41x 41x 2x 2x 41x 41x 6x 6x 41x 41x 4871x 4871x 41x | // Copyright (c) ZeroC, Inc. import { generateUUID } from "./UUID.js"; import { identityToString } from "./IdentityToString.js"; import { Promise } from "./Promise.js"; import { ObjectPrx } from "./ObjectPrx.js"; // // Ice.Communicator // export class Communicator { constructor(initData) { this._isShutdown = false; this._shutdownPromise = new Promise(); this._instance = this.createInstance(initData); this._instance.finishSetup(this); } destroy() { this.shutdown(); return this._instance.destroy(); } [Symbol.asyncDispose]() { return this.destroy(); } shutdown() { if (!this._isShutdown) { this._isShutdown = true; this._shutdownPromise.resolve(); } } waitForShutdown() { return this._shutdownPromise; } isShutdown() { return this._isShutdown; } stringToProxy(str) { const reference = this._instance.referenceFactory().createFromString(str, ""); return reference == null ? null : new ObjectPrx(reference); } proxyToString(proxy) { return proxy == null ? "" : proxy._reference.toString(); } propertyToProxy(property) { const proxy = this._instance.initializationData().properties.getProperty(property); const reference = this._instance.referenceFactory().createFromString(proxy, property); return reference == null ? null : new ObjectPrx(reference); } proxyToProperty(proxy, prefix) { return proxy._reference.toProperty(prefix); } identityToString(ident) { return identityToString(ident, this._instance.toStringMode()); } createObjectAdapter(name) { const promise = new Promise(); this._instance.objectAdapterFactory().createObjectAdapter(name, null, promise); return promise; } createObjectAdapterWithRouter(name, router) { if (name.length === 0) { name = generateUUID(); } const promise = new Promise(); // // We set the proxy properties here, although we still use the proxy supplied. // this.proxyToProperty(router, name + ".Router").forEach((value, key) => { this.getProperties().setProperty(key, value); }); this._instance.objectAdapterFactory().createObjectAdapter(name, router, promise); return promise; } getDefaultObjectAdapter() { return this._instance.outgoingConnectionFactory().getDefaultObjectAdapter(); } setDefaultObjectAdapter(adapter) { this._instance.outgoingConnectionFactory().setDefaultObjectAdapter(adapter); } getImplicitContext() { return this._instance.getImplicitContext(); } getProperties() { return this._instance.initializationData().properties; } getLogger() { return this._instance.initializationData().logger; } getDefaultRouter() { return this._instance.referenceFactory().getDefaultRouter(); } setDefaultRouter(router) { this._instance.setDefaultRouter(router); } getDefaultLocator() { return this._instance.referenceFactory().getDefaultLocator(); } setDefaultLocator(locator) { this._instance.setDefaultLocator(locator); } flushBatchRequests() { return this._instance.outgoingConnectionFactory().flushAsyncBatchRequests(); } get instance() { return this._instance; } } |