Glacier2.Router¶
- class Glacier2.Router¶
-
The Glacier2 specialization of the
Ice.RouterPrxinterface.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.SessionManagerPrxis configured, a proxy to aGlacier2.SessionPrxobject 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.SessionManagerPrxis configured.- Return type:
SessionPrx | None | Awaitable[SessionPrx | None]
- Raises:
CannotCreateSessionException – Thrown when the session cannot be created.
PermissionDeniedException – Thrown when an authentication or authorization failure occurs.
- 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.SSLSessionManagerPrxis configured, a proxy to aGlacier2.SessionPrxobject 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.SSLSessionManagerPrxis configured.- Return type:
SessionPrx | None | Awaitable[SessionPrx | None]
- Raises:
CannotCreateSessionException – Thrown when the session cannot be created.
PermissionDeniedException – Thrown when an authentication or authorization failure occurs.
- 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:
- 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.Endpointsis not configured.- Return type:
- 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:
- static ice_staticId() str¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
- 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).