Glacier2.Router

class Glacier2.Router

Bases: Router, ABC

The Glacier2 specialization of the Ice.RouterPrx interface.

Notes

The Slice compiler generated this skeleton class from Slice interface ::Glacier2::Router.

abstractmethod createSession(userId: str, password: str, current: Current) SessionPrx | None | Awaitable[SessionPrx | None]

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 (str) – The user ID.

  • password (str) – The password.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

A proxy for the newly created session, or null if no Glacier2.SessionManagerPrx is configured.

Return type:

SessionPrx | None | Awaitable[SessionPrx | None]

Raises:
abstractmethod createSessionFromSecureConnection(current: Current) SessionPrx | None | Awaitable[SessionPrx | None]

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 (Ice.Current) – The Current object for the dispatch.

Returns:

A proxy for the newly created session, or null if no Glacier2.SSLSessionManagerPrx is configured.

Return type:

SessionPrx | None | Awaitable[SessionPrx | None]

Raises:
abstractmethod destroySession(current: Current) None | Awaitable[None]

Destroys the session of the caller with this router.

Parameters:

current (Ice.Current) – The Current object for the dispatch.

Returns:

None or an awaitable that completes when the dispatch completes.

Return type:

None | Awaitable[None]

Raises:

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

abstractmethod getACMTimeout(current: Current) int | Awaitable[int]

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

Parameters:

current (Ice.Current) – The Current object for the dispatch.

Returns:

The idle timeout (in seconds).

Return type:

int | Awaitable[int]

abstractmethod getCategoryForClient(current: Current) str | Awaitable[str]

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 (Ice.Current) – The Current object for the dispatch.

Returns:

The category. It’s an empty string when Glacier2.Server.Endpoints is not configured.

Return type:

str | Awaitable[str]

abstractmethod getSessionTimeout(current: Current) int | Awaitable[int]

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

Parameters:

current (Ice.Current) – The Current object for the dispatch.

Returns:

The idle timeout (in seconds).

Return type:

int | Awaitable[int]

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str

abstractmethod refreshSession(current: Current) None | Awaitable[None]

Keeps the session with this router alive.

Parameters:

current (Ice.Current) – The Current object for the dispatch.

Returns:

None or an awaitable that completes when the dispatch completes.

Return type:

None | Awaitable[None]

Raises:

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