@zeroc/ice
    Preparing search index...

    Class SessionPrx

    Represents a session between a client application and the Glacier2 router. With Glacier2, the lifetime of a session is tied to the Ice connection between the client and the router: the session is destroyed when the connection is closed.

    • Router
    • SessionManager

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a new SessionPrx proxy.

      Parameters

      • communicator: Communicator

        The communicator for the new proxy.

      • proxyString: string

        The string representation of the proxy.

      Returns SessionPrx

      The new SessionPrx proxy.

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

    Methods

    • Destroys this session.

      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.

    • 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.

    • 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.

    • Flushes any pending batched requests for this proxy.

      Returns AsyncResult<void>

      An asynchronous result that is resolved when the pending batched requests for this proxy are flushed.

    • 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 cached connection for this proxy.

      If the proxy does not yet have an established connection, it does not attempt to create one.

      Returns Connection

      The cached connection for this proxy, or null if no connection is established.

    • Retrieves the connection used by this proxy. If the proxy does not yet have an established connection, it attempts to create one.

      Returns AsyncResult<Connection>

      An asynchronous result that resolves to the connection used by this proxy. If the connection establishment fails, the promise is rejected with an error.

    • Retrieves the connection ID used by this proxy.

      Returns string

      The connection ID currently associated with this proxy.

    • 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 invocation timeout used by this proxy.

      Returns number

      The invocation timeout value (in milliseconds) currently used by this proxy.

    • Retrieves the locator used by this proxy.

      Returns LocatorPrx

      The locator currently used by this proxy. If no locator is configured, null is returned.

    • Retrieves the locator cache timeout used by this proxy.

      Returns number

      The locator cache timeout value (in seconds) currently used by this proxy.

    • 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.

    • Determines whether this proxy uses batch oneway invocations.

      Returns boolean

      true if this proxy uses batch oneway invocations, false otherwise.

    • Checks whether this proxy caches connections.

      Returns boolean

      true if this proxy caches connections, false otherwise.

    • 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.

    • Returns a string representation of this proxy.

      Returns string

      A string representing this proxy.

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

      Returns this

      A new proxy configured to uses twoway invocations.

    • 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<SessionPrx>

      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.

    • Creates a new proxy from an existing proxy.

      Parameters

      • prx: ObjectPrx

        The source proxy.

      • Optionalfacet: string

        An optional facet name.

      Returns SessionPrx

      A new proxy with the requested type and facet, or null if the source proxy is null.

    • Creates a new proxy from an existing proxy.

      Parameters

      • prx: ObjectPrx

        The source proxy.

      • Optionalfacet: string

        An optional facet name.

      Returns SessionPrx

      A new proxy with the requested type and facet, or null if the source proxy is null.