Glacier2 package

Module contents

exception Glacier2.CannotCreateSessionException(reason: str = '')

Bases: UserException

The exception that is thrown when an attempt to create a new session fails.

Parameters:

reason (str)

Return type:

None

reason

The reason why the session creation failed.

Type:

str

class Glacier2.IdentitySet

Bases: Object, ABC

abstractmethod add(additions: list[Identity], current: Current) None | Awaitable[None]

Adds a sequence of Ice identities to this set of constraints. Order is not preserved and duplicates are implicitly removed.

Parameters:
  • additions (list[Identity]) – The sequence of Ice identities to add.

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

abstractmethod get(current: Current) Sequence[Identity] | Awaitable[Sequence[Identity]]

Gets a sequence of identities describing the constraints in this set.

Parameters:

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

Returns:

The sequence of Ice identities for this set.

Return type:

Sequence[Identity] | Awaitable[Sequence[Identity]]

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str

abstractmethod remove(deletions: list[Identity], current: Current) None | Awaitable[None]

Removes a sequence of identities from this set of constraints. No errors are returned if an entry is not found.

Parameters:
  • deletions (list[Identity]) – The sequence of Ice identities to remove.

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

class Glacier2.IdentitySetPrx

Bases: ObjectPrx

add(additions: Sequence[Identity], context: dict[str, str] | None = None) None

Adds a sequence of Ice identities to this set of constraints. Order is not preserved and duplicates are implicitly removed.

Parameters:
  • additions (Sequence[Identity]) – The sequence of Ice identities to add.

  • context (dict[str, str]) – The request context for the invocation.

Return type:

None

addAsync(additions: Sequence[Identity], context: dict[str, str] | None = None) Awaitable[None]

Adds a sequence of Ice identities to this set of constraints. Order is not preserved and duplicates are implicitly removed.

Parameters:
  • additions (Sequence[Identity]) – The sequence of Ice identities to add.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

An awaitable that is completed when the invocation completes.

Return type:

Awaitable[None]

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) IdentitySetPrx | None

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[IdentitySetPrx | None]

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

get(context: dict[str, str] | None = None) list[Identity]

Gets a sequence of identities describing the constraints in this set.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

The sequence of Ice identities for this set.

Return type:

list[Identity]

getAsync(context: dict[str, str] | None = None) Awaitable[list[Identity]]

Gets a sequence of identities describing the constraints in this set.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

The sequence of Ice identities for this set.

Return type:

Awaitable[list[Identity]]

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

remove(deletions: Sequence[Identity], context: dict[str, str] | None = None) None

Removes a sequence of identities from this set of constraints. No errors are returned if an entry is not found.

Parameters:
  • deletions (Sequence[Identity]) – The sequence of Ice identities to remove.

  • context (dict[str, str]) – The request context for the invocation.

Return type:

None

removeAsync(deletions: Sequence[Identity], context: dict[str, str] | None = None) Awaitable[None]

Removes a sequence of identities from this set of constraints. No errors are returned if an entry is not found.

Parameters:
  • deletions (Sequence[Identity]) – The sequence of Ice identities to remove.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

An awaitable that is completed when the invocation completes.

Return type:

Awaitable[None]

static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) IdentitySetPrx | None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None

exception Glacier2.PermissionDeniedException(reason: str = '')

Bases: UserException

The exception that is thrown when a client is not allowed to create a session.

Parameters:

reason (str)

Return type:

None

reason

The reason why permission was denied.

Type:

str

class Glacier2.PermissionsVerifier

Bases: Object, ABC

abstractmethod checkPermissions(userId: str, password: str, current: Current) tuple[bool, str] | Awaitable[tuple[bool, str]]

Checks if a user is authorized to establish a session.

Parameters:
  • userId (str) – The user ID.

  • password (str) – The user’s password.

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

Returns:

A tuple containing:
  • bool true if access is granted, false otherwise.

  • str The reason why access was denied.

Return type:

tuple[bool, str] | Awaitable[tuple[bool, str]]

Raises:

PermissionDeniedException – Thrown when the user’s access is denied. This exception can be thrown instead of returning false with a reason set in the reason out parameter.

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str

class Glacier2.PermissionsVerifierPrx

Bases: ObjectPrx

checkPermissions(userId: str, password: str, context: dict[str, str] | None = None) tuple[bool, str]

Checks if a user is authorized to establish a session.

Parameters:
  • userId (str) – The user ID.

  • password (str) – The user’s password.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

A tuple containing:
  • bool true if access is granted, false otherwise.

  • str The reason why access was denied.

Return type:

tuple[bool, str]

Raises:

PermissionDeniedException – Thrown when the user’s access is denied. This exception can be thrown instead of returning false with a reason set in the reason out parameter.

checkPermissionsAsync(userId: str, password: str, context: dict[str, str] | None = None) Awaitable[tuple[bool, str]]

Checks if a user is authorized to establish a session.

Parameters:
  • userId (str) – The user ID.

  • password (str) – The user’s password.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

A tuple containing:
  • bool true if access is granted, false otherwise.

  • str The reason why access was denied.

Return type:

Awaitable[tuple[bool, str]]

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) PermissionsVerifierPrx | None

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[PermissionsVerifierPrx | None]

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) PermissionsVerifierPrx | None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None

class Glacier2.Router

Bases: Router, ABC

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

class Glacier2.RouterPrx

Bases: RouterPrx

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) RouterPrx | None

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[RouterPrx | None]

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

createSession(userId: str, password: str, context: dict[str, str] | None = None) 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.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

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

Return type:

SessionPrx | None

Raises:
createSessionAsync(userId: str, password: str, context: dict[str, str] | None = 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.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

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

Return type:

Awaitable[SessionPrx | None]

createSessionFromSecureConnection(context: dict[str, str] | None = None) 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:

context (dict[str, str]) – The request context for the invocation.

Returns:

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

Return type:

SessionPrx | None

Raises:
createSessionFromSecureConnectionAsync(context: dict[str, str] | None = 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:

context (dict[str, str]) – The request context for the invocation.

Returns:

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

Return type:

Awaitable[SessionPrx | None]

destroySession(context: dict[str, str] | None = None) None

Destroys the session of the caller with this router.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Raises:

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

Return type:

None

destroySessionAsync(context: dict[str, str] | None = None) Awaitable[None]

Destroys the session of the caller with this router.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

An awaitable that is completed when the invocation completes.

Return type:

Awaitable[None]

getACMTimeout(context: dict[str, str] | None = None) int

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

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

The idle timeout (in seconds).

Return type:

int

getACMTimeoutAsync(context: dict[str, str] | None = None) Awaitable[int]

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

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

The idle timeout (in seconds).

Return type:

Awaitable[int]

getCategoryForClient(context: dict[str, str] | None = None) 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:

context (dict[str, str]) – The request context for the invocation.

Returns:

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

Return type:

str

getCategoryForClientAsync(context: dict[str, str] | None = None) 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:

context (dict[str, str]) – The request context for the invocation.

Returns:

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

Return type:

Awaitable[str]

getSessionTimeout(context: dict[str, str] | None = None) int

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

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

The idle timeout (in seconds).

Return type:

int

getSessionTimeoutAsync(context: dict[str, str] | None = None) Awaitable[int]

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

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

The idle timeout (in seconds).

Return type:

Awaitable[int]

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

refreshSession(context: dict[str, str] | None = None) None

Keeps the session with this router alive.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Raises:

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

Return type:

None

refreshSessionAsync(context: dict[str, str] | None = None) Awaitable[None]

Keeps the session with this router alive.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

An awaitable that is completed when the invocation completes.

Return type:

Awaitable[None]

static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) RouterPrx | None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None

class Glacier2.SSLInfo(remoteHost: str = '', remotePort: int = 0, localHost: str = '', localPort: int = 0, cipher: str = '', certs: list[str] = <factory>)

Bases: object

Represents information gathered from an incoming SSL connection and used for authentication and authorization.

Parameters:
  • remoteHost (str)

  • remotePort (int)

  • localHost (str)

  • localPort (int)

  • cipher (str)

  • certs (list[str])

remoteHost

The remote host.

Type:

str

remotePort

The remote port.

Type:

int

localHost

The router’s host.

Type:

str

localPort

The router’s port.

Type:

int

cipher

The negotiated cipher suite.

Type:

str

certs

The certificate chain.

Type:

list[str]

class Glacier2.SSLPermissionsVerifier

Bases: Object, ABC

abstractmethod authorize(info: SSLInfo, current: Current) tuple[bool, str] | Awaitable[tuple[bool, str]]

Checks if a user is authorized to establish a session.

Parameters:
  • info (SSLInfo) – The SSL information.

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

Returns:

A tuple containing:
  • bool true if access is granted, false otherwise.

  • str The reason why access was denied.

Return type:

tuple[bool, str] | Awaitable[tuple[bool, str]]

Raises:

PermissionDeniedException – Thrown when the user’s access is denied. This exception can be thrown instead of returning false with a reason set in the reason out parameter.

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str

class Glacier2.SSLPermissionsVerifierPrx

Bases: ObjectPrx

authorize(info: SSLInfo, context: dict[str, str] | None = None) tuple[bool, str]

Checks if a user is authorized to establish a session.

Parameters:
  • info (SSLInfo) – The SSL information.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

A tuple containing:
  • bool true if access is granted, false otherwise.

  • str The reason why access was denied.

Return type:

tuple[bool, str]

Raises:

PermissionDeniedException – Thrown when the user’s access is denied. This exception can be thrown instead of returning false with a reason set in the reason out parameter.

authorizeAsync(info: SSLInfo, context: dict[str, str] | None = None) Awaitable[tuple[bool, str]]

Checks if a user is authorized to establish a session.

Parameters:
  • info (SSLInfo) – The SSL information.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

A tuple containing:
  • bool true if access is granted, false otherwise.

  • str The reason why access was denied.

Return type:

Awaitable[tuple[bool, str]]

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) SSLPermissionsVerifierPrx | None

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[SSLPermissionsVerifierPrx | None]

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) SSLPermissionsVerifierPrx | None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None

class Glacier2.SSLSessionManager

Bases: Object, ABC

abstractmethod create(info: SSLInfo, control: SessionControlPrx | None, current: Current) SessionPrx | None | Awaitable[SessionPrx | None]

Creates a new session object.

Parameters:
  • info (SSLInfo) – The SSL info.

  • control (SessionControlPrx | None) – A proxy to the session control object. This proxy is null when Glacier2.Server.Endpoints is not configured.

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

Returns:

A proxy to the newly created session. This proxy is never null.

Return type:

SessionPrx | None | Awaitable[SessionPrx | None]

Raises:

CannotCreateSessionException – Thrown when the session cannot be created.

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str

class Glacier2.SSLSessionManagerPrx

Bases: ObjectPrx

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) SSLSessionManagerPrx | None

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[SSLSessionManagerPrx | None]

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

create(info: SSLInfo, control: SessionControlPrx | None, context: dict[str, str] | None = None) SessionPrx | None

Creates a new session object.

Parameters:
  • info (SSLInfo) – The SSL info.

  • control (SessionControlPrx | None) – A proxy to the session control object. This proxy is null when Glacier2.Server.Endpoints is not configured.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

A proxy to the newly created session. This proxy is never null.

Return type:

SessionPrx | None

Raises:

CannotCreateSessionException – Thrown when the session cannot be created.

createAsync(info: SSLInfo, control: SessionControlPrx | None, context: dict[str, str] | None = None) Awaitable[SessionPrx | None]

Creates a new session object.

Parameters:
  • info (SSLInfo) – The SSL info.

  • control (SessionControlPrx | None) – A proxy to the session control object. This proxy is null when Glacier2.Server.Endpoints is not configured.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

A proxy to the newly created session. This proxy is never null.

Return type:

Awaitable[SessionPrx | None]

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) SSLSessionManagerPrx | None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None

class Glacier2.Session

Bases: Object, ABC

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

Destroys this session.

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]

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str

class Glacier2.SessionControl

Bases: Object, ABC

abstractmethod adapterIds(current: Current) StringSetPrx | None | Awaitable[StringSetPrx | None]

Gets a proxy to the object that manages the allowable adapter identities for objects for this session.

Parameters:

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

Returns:

A proxy to a Glacier2.StringSetPrx object. This proxy is never null.

Return type:

StringSetPrx | None | Awaitable[StringSetPrx | None]

abstractmethod categories(current: Current) StringSetPrx | None | Awaitable[StringSetPrx | None]

Gets a proxy to the object that manages the allowable categories for object identities for this session.

Parameters:

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

Returns:

A proxy to a Glacier2.StringSetPrx object. This proxy is never null.

Return type:

StringSetPrx | None | Awaitable[StringSetPrx | None]

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

Destroys the associated session.

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]

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

Gets the session timeout.

Parameters:

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

Returns:

The timeout.

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 identities(current: Current) IdentitySetPrx | None | Awaitable[IdentitySetPrx | None]

Gets a proxy to the object that manages the allowable object identities for this session.

Parameters:

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

Returns:

A proxy to an Glacier2.IdentitySetPrx object. This proxy is never null.

Return type:

IdentitySetPrx | None | Awaitable[IdentitySetPrx | None]

class Glacier2.SessionControlPrx

Bases: ObjectPrx

adapterIds(context: dict[str, str] | None = None) StringSetPrx | None

Gets a proxy to the object that manages the allowable adapter identities for objects for this session.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

A proxy to a Glacier2.StringSetPrx object. This proxy is never null.

Return type:

StringSetPrx | None

adapterIdsAsync(context: dict[str, str] | None = None) Awaitable[StringSetPrx | None]

Gets a proxy to the object that manages the allowable adapter identities for objects for this session.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

A proxy to a Glacier2.StringSetPrx object. This proxy is never null.

Return type:

Awaitable[StringSetPrx | None]

categories(context: dict[str, str] | None = None) StringSetPrx | None

Gets a proxy to the object that manages the allowable categories for object identities for this session.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

A proxy to a Glacier2.StringSetPrx object. This proxy is never null.

Return type:

StringSetPrx | None

categoriesAsync(context: dict[str, str] | None = None) Awaitable[StringSetPrx | None]

Gets a proxy to the object that manages the allowable categories for object identities for this session.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

A proxy to a Glacier2.StringSetPrx object. This proxy is never null.

Return type:

Awaitable[StringSetPrx | None]

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) SessionControlPrx | None

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[SessionControlPrx | None]

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

destroy(context: dict[str, str] | None = None) None

Destroys the associated session.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Return type:

None

destroyAsync(context: dict[str, str] | None = None) Awaitable[None]

Destroys the associated session.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

An awaitable that is completed when the invocation completes.

Return type:

Awaitable[None]

getSessionTimeout(context: dict[str, str] | None = None) int

Gets the session timeout.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

The timeout.

Return type:

int

getSessionTimeoutAsync(context: dict[str, str] | None = None) Awaitable[int]

Gets the session timeout.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

The timeout.

Return type:

Awaitable[int]

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

identities(context: dict[str, str] | None = None) IdentitySetPrx | None

Gets a proxy to the object that manages the allowable object identities for this session.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

A proxy to an Glacier2.IdentitySetPrx object. This proxy is never null.

Return type:

IdentitySetPrx | None

identitiesAsync(context: dict[str, str] | None = None) Awaitable[IdentitySetPrx | None]

Gets a proxy to the object that manages the allowable object identities for this session.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

A proxy to an Glacier2.IdentitySetPrx object. This proxy is never null.

Return type:

Awaitable[IdentitySetPrx | None]

static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) SessionControlPrx | None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None

class Glacier2.SessionManager

Bases: Object, ABC

abstractmethod create(userId: str, control: SessionControlPrx | None, current: Current) SessionPrx | None | Awaitable[SessionPrx | None]

Creates a new session object.

Parameters:
  • userId (str) – The user ID for the session.

  • control (SessionControlPrx | None) – A proxy to the session control object. This proxy is null when Glacier2.Server.Endpoints is not configured.

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

Returns:

A proxy to the newly created session. This proxy is never null.

Return type:

SessionPrx | None | Awaitable[SessionPrx | None]

Raises:

CannotCreateSessionException – Thrown when the session cannot be created.

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str

class Glacier2.SessionManagerPrx

Bases: ObjectPrx

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) SessionManagerPrx | None

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[SessionManagerPrx | None]

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

create(userId: str, control: SessionControlPrx | None, context: dict[str, str] | None = None) SessionPrx | None

Creates a new session object.

Parameters:
  • userId (str) – The user ID for the session.

  • control (SessionControlPrx | None) – A proxy to the session control object. This proxy is null when Glacier2.Server.Endpoints is not configured.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

A proxy to the newly created session. This proxy is never null.

Return type:

SessionPrx | None

Raises:

CannotCreateSessionException – Thrown when the session cannot be created.

createAsync(userId: str, control: SessionControlPrx | None, context: dict[str, str] | None = None) Awaitable[SessionPrx | None]

Creates a new session object.

Parameters:
  • userId (str) – The user ID for the session.

  • control (SessionControlPrx | None) – A proxy to the session control object. This proxy is null when Glacier2.Server.Endpoints is not configured.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

A proxy to the newly created session. This proxy is never null.

Return type:

Awaitable[SessionPrx | None]

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) SessionManagerPrx | None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None

exception Glacier2.SessionNotExistException

Bases: UserException

The exception that is thrown when a client tries to destroy a session with a router, but no session exists for this client.

Return type:

None

class Glacier2.SessionPrx

Bases: ObjectPrx

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) SessionPrx | None

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[SessionPrx | None]

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

destroy(context: dict[str, str] | None = None) None

Destroys this session.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Return type:

None

destroyAsync(context: dict[str, str] | None = None) Awaitable[None]

Destroys this session.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

An awaitable that is completed when the invocation completes.

Return type:

Awaitable[None]

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) SessionPrx | None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None

class Glacier2.StringSet

Bases: Object, ABC

abstractmethod add(additions: list[str], current: Current) None | Awaitable[None]

Adds a sequence of strings to this set of constraints. Order is not preserved and duplicates are implicitly removed.

Parameters:
  • additions (list[str]) – The sequence of strings to add.

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

abstractmethod get(current: Current) Sequence[str] | Awaitable[Sequence[str]]

Gets a sequence of strings describing the constraints in this set.

Parameters:

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

Returns:

The sequence of strings for this set.

Return type:

Sequence[str] | Awaitable[Sequence[str]]

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str

abstractmethod remove(deletions: list[str], current: Current) None | Awaitable[None]

Removes a sequence of strings from this set of constraints. No errors are returned if an entry is not found.

Parameters:
  • deletions (list[str]) – The sequence of strings to remove.

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

class Glacier2.StringSetPrx

Bases: ObjectPrx

add(additions: Sequence[str], context: dict[str, str] | None = None) None

Adds a sequence of strings to this set of constraints. Order is not preserved and duplicates are implicitly removed.

Parameters:
  • additions (Sequence[str]) – The sequence of strings to add.

  • context (dict[str, str]) – The request context for the invocation.

Return type:

None

addAsync(additions: Sequence[str], context: dict[str, str] | None = None) Awaitable[None]

Adds a sequence of strings to this set of constraints. Order is not preserved and duplicates are implicitly removed.

Parameters:
  • additions (Sequence[str]) – The sequence of strings to add.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

An awaitable that is completed when the invocation completes.

Return type:

Awaitable[None]

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) StringSetPrx | None

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[StringSetPrx | None]

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

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

  • context (dict[str, str], optional) – The request context.

Returns:

A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.

Return type:

ObjectPrx | None

get(context: dict[str, str] | None = None) list[str]

Gets a sequence of strings describing the constraints in this set.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

The sequence of strings for this set.

Return type:

list[str]

getAsync(context: dict[str, str] | None = None) Awaitable[list[str]]

Gets a sequence of strings describing the constraints in this set.

Parameters:

context (dict[str, str]) – The request context for the invocation.

Returns:

The sequence of strings for this set.

Return type:

Awaitable[list[str]]

static ice_staticId() str

Gets the Slice type ID of the interface associated with this proxy.

Returns:

The type ID, “::Ice::Object”.

Return type:

str

remove(deletions: Sequence[str], context: dict[str, str] | None = None) None

Removes a sequence of strings from this set of constraints. No errors are returned if an entry is not found.

Parameters:
  • deletions (Sequence[str]) – The sequence of strings to remove.

  • context (dict[str, str]) – The request context for the invocation.

Return type:

None

removeAsync(deletions: Sequence[str], context: dict[str, str] | None = None) Awaitable[None]

Removes a sequence of strings from this set of constraints. No errors are returned if an entry is not found.

Parameters:
  • deletions (Sequence[str]) – The sequence of strings to remove.

  • context (dict[str, str]) – The request context for the invocation.

Returns:

An awaitable that is completed when the invocation completes.

Return type:

Awaitable[None]

static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) StringSetPrx | None

Creates a new proxy from an existing proxy.

Parameters:
  • proxy (ObjectPrx | None) – The source proxy.

  • facet (str, optional) – A facet name.

Returns:

A new proxy with the requested type, or None if the source proxy is None.

Return type:

ObjectPrx | None