@zeroc/ice
    Preparing search index...

    Class RouterPrx

    The Glacier2 specialization of the Ice.RouterPrx interface.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    • Constructs a new RouterPrx proxy.

      Parameters

      • communicator: Communicator

        The communicator for the new proxy.

      • proxyString: string

        The string representation of the proxy.

      Returns Glacier2.RouterPrx

      The new RouterPrx proxy.

      ParseException - Thrown if the proxyString is not a valid proxy string.

    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.

      • Optionalcontext: Map<string, string>

        The Context map to send with the invocation.

      Returns AsyncResult<ObjectPrx[]>

      An Ice.AsyncResult object representing the result of the invocation, 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.

      • Optionalcontext: Map<string, string>

        The Context map to send with the invocation.

      Returns AsyncResult<SessionPrx>

      An Ice.AsyncResult object representing the result of the invocation, 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

      • Optionalcontext: Map<string, string>

        The Context map to send with the invocation.

      Returns AsyncResult<SessionPrx>

      An Ice.AsyncResult object representing the result of the invocation, 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

      • Optionalcontext: Map<string, string>

        The Context map to send with the invocation.

      Returns AsyncResult<void>

      An Ice.AsyncResult object representing the result of the invocation.

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

    • Checks whether the specified object is equal to this object.

      Parameters

      Returns boolean

      true if the specified object is equal to this object, false otherwise.

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

      Parameters

      • Optionalcontext: Map<string, string>

        The Context map to send with the invocation.

      Returns AsyncResult<number>

      An Ice.AsyncResult object representing the result of the invocation, 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

      • Optionalcontext: Map<string, string>

        The Context map to send with the invocation.

      Returns AsyncResult<string>

      An Ice.AsyncResult object representing the result of the invocation, 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

      • Optionalcontext: Map<string, string>

        The Context map to send with the invocation.

      Returns AsyncResult<[ObjectPrx, boolean]>

      An Ice.AsyncResult object representing the result of the invocation, 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

      • Optionalcontext: Map<string, string>

        The Context map to send with the invocation.

      Returns AsyncResult<ObjectPrx>

      An Ice.AsyncResult object representing the result of the invocation, which resolves to:

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

      Parameters

      • Optionalcontext: Map<string, string>

        The Context map to send with the invocation.

      Returns AsyncResult<bigint>

      An Ice.AsyncResult object representing the result of the invocation, which resolves to:

      • bigint : The idle timeout (in seconds).
    • Creates a new proxy identical to this one, but with a different adapter ID.

      Parameters

      • id: string

        The adapter ID for the new proxy.

      Returns this

      A new proxy with the specified adapter ID.

    • Creates a new proxy identical to this one, but configured to use batch oneway invocations.

      Returns this

      A new proxy configured to use batch oneway invocations.

    • Creates a new proxy identical to this one, but with a different connection caching configuration.

      Parameters

      • cache: boolean

        The connection caching configuration for the new proxy: true if the new proxy should cache connections, false otherwise.

      Returns this

      A new proxy configured with the specified connection caching policy.

    • Creates a new proxy identical to this one, but with a different connection ID.

      Parameters

      • connectionId: string

        The connection ID for the new proxy. An empty string removes the connection ID.

      Returns this

      A new proxy configured with the specified connection ID.

    • Creates a new proxy identical to this one, but with a different per-proxy context.

      Parameters

      • context: Map<string, string>

        The context map for the new proxy.

      Returns this

      A new proxy with the specified per-proxy context.

    • Creates a new proxy identical to this one, but with a different encoding version used to marshal parameters.

      Parameters

      • encodingVersion: EncodingVersion

        The encoding version to use for marshaling request parameters.

      Returns this

      A new proxy configured with the specified encoding version.

    • Creates a new proxy identical to this one, but with different endpoints.

      Parameters

      • endpoints: Endpoint[]

        The endpoints for the new proxy.

      Returns this

      A new proxy with the specified endpoints.

    • Creates a new proxy identical to this one, but with a different facet.

      Parameters

      • facet: string

        The facet for the new proxy.

      Returns this

      A new proxy with the specified facet.

    • Creates a new proxy identical to this one, but as a fixed proxy bound to the specified connection.

      Parameters

      • connection: Connection

        The connection to be used by the new fixed proxy.

      Returns this

      A new fixed proxy bound to the specified connection.

    • Retrieves the adapter ID associated with this proxy.

      Returns string

      The adapter ID. If the proxy does not have an adapter ID, an empty string is returned.

    • Retrieves the per-proxy context used by this proxy.

      Returns Map<string, string>

      The per-proxy context currently used by this proxy.

    • Retrieves the facet used by this proxy.

      Returns string

      The facet currently used by this proxy. If the proxy uses the default facet, an empty string is returned.

    • Retrieves the Slice type ID of the most-derived interface supported by the target object of this proxy.

      Parameters

      • Optionalcontext: Map<string, string>

        An optional context map for the invocation.

      Returns AsyncResult<string>

      An asynchronous result that resolves to the Slice type ID of the most-derived interface supported by the target object.

    • Creates a new proxy identical to this one, but with a different identity.

      Parameters

      • id: Identity

        The identity for the new proxy.

      Returns this

      A new proxy with the specified identity.

    • Retrieves the Slice type IDs of all interfaces supported by the target object of this proxy.

      Parameters

      • Optionalcontext: Map<string, string>

        An optional context map for the invocation.

      Returns AsyncResult<string[]>

      An asynchronous result that resolves to an array of Slice type IDs representing the interfaces supported by the target object of this proxy.

    • Creates a new proxy identical to this one, but with a different invocation timeout.

      Parameters

      • timeout: number

        The invocation timeout (in milliseconds) to be used by the new proxy.

      Returns this

      A new proxy configured with the specified invocation timeout.

    • Determines if this object supports a specific Slice interface.

      Parameters

      • id: string

        The type ID of the Slice interface to check.

      • Optionalcontext: Map<string, string>

        An optional context map for the invocation.

      Returns AsyncResult<boolean>

      An asynchronous result that resolves to true if this object supports the interface specified by id, or if it derives from the specified interface. Otherwise, it resolves to false.

    • Checks whether this proxy is a fixed proxy.

      Returns boolean

      true if this proxy is a fixed proxy, false otherwise.

    • Determines whether this proxy uses oneway invocations.

      Returns boolean

      true if this proxy uses oneway invocations, false otherwise.

    • Determines whether this proxy uses twoway invocations.

      Returns boolean

      true if this proxy uses twoway invocations, false otherwise.

    • Creates a new proxy identical to this one, but with a different locator.

      Parameters

      • locator: LocatorPrx

        The locator to be used by the new proxy.

      Returns this

      A new proxy configured with the specified locator.

    • Creates a new proxy identical to this one, but with a different locator cache timeout.

      Parameters

      • timeout: number

        The locator cache timeout (in seconds) to be used by the new proxy.

      Returns this

      A new proxy configured with the specified locator cache timeout.

    • Creates a new proxy identical to this one, but configured to use oneway invocations.

      Returns this

      A new proxy configured to use oneway invocations.

    • Checks if the target object of this proxy is reachable.

      Parameters

      • Optionalcontext: Map<string, string>

        An optional context map for the invocation.

      Returns AsyncResult<void>

      An asynchronous result that resolves when the ping operation completes. If the target object is unreachable, the result is rejected with an error.

    • Creates a new proxy identical to this one, but with a different router.

      Parameters

      • router: Ice.RouterPrx

        The router to be used by the new proxy.

      Returns this

      A new proxy configured with the specified router.

    • Creates a new proxy identical to this one, but configured to use twoway invocations.

      Returns this

      A new proxy configured to uses twoway invocations.

    • Keeps the session with this router alive.

      Parameters

      • Optionalcontext: Map<string, string>

        The Context map to send with the invocation.

      Returns AsyncResult<void>

      An Ice.AsyncResult object representing the result of the invocation.

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

      As of Ice 3.8, this operation does nothing.

    • Creates a new proxy from an existing proxy after confirming the target object's type via a remote invocation.

      Parameters

      • prx: ObjectPrx

        The source proxy.

      • Optionalfacet: string

        An optional facet name.

      • Optionalcontext: Map<string, string>

        The request context.

      Returns AsyncResult<Glacier2.RouterPrx>

      A proxy with the requested type and facet, or null if the target object does not support the requested type.

    • Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.

      Returns string

      The Slice type ID of the most-derived interface supported by the target object.