@zeroc/ice
    Preparing search index...

    Class RouterAbstract

    The Glacier2 specialization of the Ice.RouterPrx interface.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Methods

    • Adds new proxy information to the router's routing table.

      Parameters

      • proxies: ObjectPrx[]

        The proxies to add. Adding a null proxy is an error.

      • current: Current

        The Current object for the dispatch.

      Returns ObjectPrx[] | PromiseLike<ObjectPrx[]>

      A promise like object representing the result of the dispatch, which resolves to:

      • (Ice.ObjectPrx | null)[] : Proxies discarded by the router. These proxies are all non-null.
    • Creates a session for the client (caller) with the router. If a Glacier2.SessionManagerPrx is configured, a proxy to a Glacier2.SessionPrx object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not visible to the client) is created. If a non-null session proxy is returned, it must be configured to route through the router that created it. This occurs automatically when the router is configured as the client's default router at the time the session proxy is created in the client application; otherwise, the client must configure the session proxy explicitly.

      Parameters

      • userId: string

        The user ID.

      • password: string

        The password.

      • current: Current

        The Current object for the dispatch.

      Returns SessionPrx | PromiseLike<SessionPrx>

      A promise like object representing the result of the dispatch, which resolves to:

      Glacier2.CannotCreateSessionException Thrown when the session cannot be created.

      Glacier2.PermissionDeniedException Thrown when an authentication or authorization failure occurs.

      • Session
      • SessionManager
      • PermissionsVerifier
    • Creates a per-client session with the router. The user is authenticated through the SSL certificate(s) associated with the connection. If an Glacier2.SSLSessionManagerPrx is configured, a proxy to a Glacier2.SessionPrx object is returned to the client. Otherwise, null is returned and only an internal session (i.e., not visible to the client) is created. If a non-null session proxy is returned, it must be configured to route through the router that created it. This occurs automatically when the router is configured as the client's default router at the time the session proxy is created in the client application; otherwise, the client must configure the session proxy explicitly.

      Parameters

      • current: Current

        The Current object for the dispatch.

      Returns SessionPrx | PromiseLike<SessionPrx>

      A promise like object representing the result of the dispatch, which resolves to:

      Glacier2.CannotCreateSessionException Thrown when the session cannot be created.

      Glacier2.PermissionDeniedException Thrown when an authentication or authorization failure occurs.

      • Session
      • SessionManager
      • PermissionsVerifier
    • Destroys the session of the caller with this router.

      Parameters

      • current: Current

        The Current object for the dispatch.

      Returns void | PromiseLike<void>

      A promise like object representing the result of the dispatch.

      Glacier2.SessionNotExistException Thrown when no session exists for the caller (client).

    • Dispatches an incoming request to one of the methods of this generated class, based on the operation name carried by the request.

      Parameters

      Returns OutgoingResponse | PromiseLike<OutgoingResponse>

      The outgoing response (when the selected method returns a value), or a promise with the outgoing response (when the selected method returns a promise).

      Ice marshals any exception thrown by this method into the response.

    • Gets the idle timeout used by the server-side of the connection.

      Parameters

      • current: Current

        The Current object for the dispatch.

      Returns number | PromiseLike<number>

      A promise like object representing the result of the dispatch, which resolves to:

      • number : The idle timeout (in seconds).
    • Gets a unique category that identifies the client (caller) in the router. This category must be used in the identities of all the client's callback objects.

      Parameters

      • current: Current

        The Current object for the dispatch.

      Returns string | PromiseLike<string>

      A promise like object representing the result of the dispatch, which resolves to:

      • string : The category. It's an empty string when Glacier2.Server.Endpoints is not configured.
    • Gets the router's client proxy, i.e. the proxy to use for forwarding requests from the client to the router. If a null proxy is returned, the client will forward requests to the router's endpoints.

      Parameters

      • current: Current

        The Current object for the dispatch.

      Returns [ObjectPrx, boolean] | PromiseLike<[ObjectPrx, boolean]>

      A promise like object representing the result of the dispatch, which resolves to an array with the following entries:

      • Ice.ObjectPrx | null : The router's client proxy.
      • boolean | undefined : Indicates whether or not the router supports a routing table. If true, the Ice runtime will call Ice.RouterPrx.addProxies to populate the routing table. The Ice runtime assumes the router has a routing table when hasRoutingTable is not set.

      Introduced in Ice 3.7.

    • Gets the router's server proxy, i.e. the proxy to use for forwarding requests from the server to the router. The Ice runtime uses the endpoints of this proxy as the published endpoints of bi-dir object adapters.

      Parameters

      • current: Current

        The Current object for the dispatch.

      Returns ObjectPrx | PromiseLike<ObjectPrx>

      A promise like object representing the result of the dispatch, which resolves to:

      • Ice.ObjectPrx | null : The router's server proxy.
    • Gets the idle timeout used by the server-side of the connection.

      Parameters

      • current: Current

        The Current object for the dispatch.

      Returns bigint | PromiseLike<bigint>

      A promise like object representing the result of the dispatch, which resolves to:

      • bigint : The idle timeout (in seconds).
    • Returns the Slice type ID of the most-derived interface supported by this object.

      Parameters

      • current: Current

        The Current object for the invocation.

      Returns string | PromiseLike<string>

      The Slice type ID of the most-derived interface.

    • Returns the Slice type IDs of the interfaces supported by this object.

      Parameters

      • current: Current

        The Current object for the invocation.

      Returns string[] | PromiseLike<string[]>

      The Slice type IDs of the interfaces supported by this object, in alphabetical order.

    • Tests whether this object supports a specific Slice interface.

      Parameters

      • typeID: string

        The type ID of the Slice interface to test against.

      • current: Current

        The Current object for the invocation.

      Returns boolean | PromiseLike<boolean>

      True if this object has the interface specified by typeID or derives from the interface specified by typeID.

    • Tests whether this object can be reached.

      Parameters

      • current: Current

        The Current object for the invocation.

      Returns void | PromiseLike<void>

    • Keeps the session with this router alive.

      Parameters

      • current: Current

        The Current object for the dispatch.

      Returns void | PromiseLike<void>

      A promise like object representing the result of the dispatch.

      Glacier2.SessionNotExistException Thrown when no session exists for the caller (client).

    • Obtains the Slice type ID of this type.

      Returns string

      The return value is always "::Glacier2::Router".