@zeroc/ice
    Preparing search index...

    Interface Communicator

    The central object in Ice. One or more communicators can be instantiated for an Ice application.

    interface Communicator {
        "[asyncDispose]"(): Promise<void>;
        createObjectAdapter(name: string): Promise<ObjectAdapter>;
        createObjectAdapterWithRouter(
            name: string,
            router: Ice.RouterPrx,
        ): Promise<ObjectAdapter>;
        destroy(): Promise<void>;
        flushBatchRequests(): Promise<void>;
        getDefaultLocator(): LocatorPrx;
        getDefaultObjectAdapter(): ObjectAdapter;
        getDefaultRouter(): Ice.RouterPrx;
        getImplicitContext(): ImplicitContext;
        getLogger(): Logger;
        getProperties(): Properties;
        identityToString(identity: Identity): string;
        isShutdown(): boolean;
        propertyToProxy(property: string): ObjectPrx;
        proxyToProperty(proxy: ObjectPrx, property: string): PropertyDict;
        proxyToString(prx: ObjectPrx): string;
        setDefaultLocator(locator: LocatorPrx): void;
        setDefaultObjectAdapter(adapter: ObjectAdapter): void;
        setDefaultRouter(router: Ice.RouterPrx): void;
        shutdown(): void;
        stringToProxy(proxyString: string): ObjectPrx;
        waitForShutdown(): Promise<void>;
    }
    Index

    Methods

    • Asynchronously disposes this communicator. It's an alias for destroy.

      Returns Promise<void>

    • Creates a new object adapter.

      It is valid to create an object adapter with an empty string as its name. Such an object adapter is accessible via bidirectional connections. Attempts to create a named object adapter for which no configuration can be found will raise an InitializationException.

      Parameters

      • name: string

        The object adapter name.

      Returns Promise<ObjectAdapter>

      A promise that resolves to the created object adapter.

      InitializationException - Thrown if the object adapter cannot be created.

    • Creates a new object adapter with a router.

      This operation creates a routed object adapter. If the name parameter is an empty string, a UUID will be generated and used as the object adapter name.

      Parameters

      • name: string

        The object adapter name.

      • router: Ice.RouterPrx

        The router to associate with the object adapter.

      Returns Promise<ObjectAdapter>

      A promise that resolves to the created object adapter.

    • Destroys this communicator. This method calls shutdown implicitly. Calling destroy destroys all object adapters, and closes all outgoing connections. {@code destroy} waits for all outstanding dispatches to complete before resolving the returned promise. This includes "bidirectional dispatches" that execute on outgoing connections.

      Returns Promise<void>

      A promise that is resolved when the communicator has been destroyed.

    • Flushes any pending batch requests for this communicator.

      This operation flushes all batch requests invoked on fixed proxies for all connections associated with the communicator. Any errors that occur while flushing a connection are ignored.

      Returns Promise<void>

      A promise that resolves when the flush operation is complete.

    • Retrieves the implicit context associated with this communicator.

      Returns ImplicitContext

      The implicit context associated with this communicator, or null if the Ice.ImplicitContext property is not set or is set to None.

    • Retrieves the logger associated with this communicator.

      Returns Logger

      The logger of the communicator.

    • Retrieves the properties associated with this communicator.

      Returns Properties

      The properties of the communicator.

    • Converts an identity into a string.

      Parameters

      • identity: Identity

        The identity to convert into a string.

      Returns string

      The string representation of the identity.

    • Checks whether #shutdown has been called.

      Returns boolean

      {@code true} if #shutdown was called on this communicator; {@code false} otherwise.

    • Converts a set of proxy properties into a proxy. The "base" name supplied in theproperty argument refers to a property containing a stringified proxy, such as MyProxy=id:tcp -h localhost -p 10000. Additional properties configure local settings for the proxy.

      Parameters

      • property: string

        The base property name.

      Returns ObjectPrx

      The proxy, or null if the property is not set.

    • Converts a proxy into a set of proxy properties.

      Parameters

      • proxy: ObjectPrx

        The proxy to convert.

      • property: string

        The base property name to associate with the proxy.

      Returns PropertyDict

      A dictionary containing the property set derived from the proxy.

    • Converts a proxy into a string.

      Parameters

      • prx: ObjectPrx

        The proxy to convert into a string.

      Returns string

      The string representation of the proxy, or an empty string if prx is null.

    • Sets the communicator's default locator.

      All newly created proxies will use this default locator. To disable the default locator, pass null. Note that this operation has no effect on existing proxies.

      You can also set a locator for an individual proxy by calling ObjectPrx#ice_locator on the proxy.

      Parameters

      • locator: LocatorPrx

        The default locator to use for this communicator, or null to disable the default locator.

      Returns void

    • Sets the object adapter that is associated by default with new outgoing connections created by this communicator. This method has no effect on existing connections.

      Parameters

      • adapter: ObjectAdapter

        The object adapter to associate by default with new outgoing connections.

      Returns void

    • Sets the communicator's default router.

      All newly created proxies will use this default router. To disable the default router, pass null. Note that this operation has no effect on existing proxies.

      You can also set a router for an individual proxy by calling ObjectPrx#ice_router on the proxy.

      Parameters

      • router: Ice.RouterPrx

        The default router to use for this communicator, or null to disable the default router.

      Returns void

    • Shuts down this communicator. In JavaScript, shutdown resolves a promise and doesn't do anything else.

      Returns void

    • Converts a proxy string into a proxy.

      Parameters

      • proxyString: string

        The proxy string to convert.

      Returns ObjectPrx

      The proxy, or null if proxyString is an empty string.