@zeroc/ice
    Preparing search index...

    Interface ImplicitContext

    Interface to associate implicit contexts with communicators.

    When you make a remote invocation without an explicit context parameter, Ice uses the per-proxy context (if any) combined with the ImplicitContext associated with the communicator.

    Ice provides two implementations of ImplicitContext, depending on the value of the Ice.ImplicitContext property:

    • None (default): No implicit context is used.
    • Shared: A single context is shared by all invocations.

    The ImplicitContext interface provides several operations to create, update, or retrieve an entry in the underlying context without retrieving a copy of the entire context.

    interface ImplicitContext {
        containsKey(key: string): boolean;
        get(key: string): string;
        getContext(): Context;
        put(key: string, value: string): string;
        remove(key: string): string;
        setContext(newContext: Context): void;
    }
    Index

    Methods

    • Checks if this key has an associated value in the underlying context.

      Parameters

      • key: string

        The key.

      Returns boolean

      true if the key has an associated value, false otherwise.

    • Retrieves the value associated with the given key in the underlying context.

      Returns an empty string if no value is associated with the key. Use ImplicitContext#containsKey to distinguish between an empty-string value and no value at all.

      Parameters

      • key: string

        The key.

      Returns string

      The value associated with the key, or an empty string if no value is associated with the key.

    • Retrieves a copy of the underlying context.

      Returns Context

      A copy of the underlying context.

    • Creates or updates a key/value entry in the underlying context.

      Parameters

      • key: string

        The key.

      • value: string

        The value.

      Returns string

      The previous value associated with the key, if any.

    • Removes the entry for the given key in the underlying context.

      Parameters

      • key: string

        The key.

      Returns string

      The value that was associated with the key, if any.

    • Sets the underlying context.

      Parameters

      • newContext: Context

        The new context.

      Returns void