IceGrid.AdminSessionPrx

class IceGrid.AdminSessionPrx

Bases: SessionPrx

Represents an administrative session between an admin tool and an IceGrid registry.

Notes

The Slice compiler generated this proxy class from Slice interface ::IceGrid::AdminSession.

static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) AdminSessionPrx | 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[AdminSessionPrx | 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

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

Finishes updating the registry and releases the exclusive lock.

Parameters:

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

Raises:

AccessDeniedException – Thrown when the session doesn’t hold the exclusive lock.

Return type:

None

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

Finishes updating the registry and releases the exclusive lock.

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]

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

Gets a proxy to the IceGrid admin object. The admin object returned by this operation can only be accessed by the session.

Parameters:

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

Returns:

A proxy to the IceGrid admin object. This proxy is never null.

Return type:

AdminPrx | None

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

Gets a proxy to the IceGrid admin object. The admin object returned by this operation can only be accessed by the session.

Parameters:

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

Returns:

A proxy to the IceGrid admin object. This proxy is never null.

Return type:

Awaitable[AdminPrx | None]

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

Gets a “template” proxy for admin callback objects. An Admin client uses this proxy to set the category of its callback objects, and the published endpoints of the object adapter hosting the admin callback objects.

Parameters:

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

Returns:

A template proxy. The returned proxy is null when the Admin session was established using Glacier2.

Return type:

ObjectPrx | None

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

Gets a “template” proxy for admin callback objects. An Admin client uses this proxy to set the category of its callback objects, and the published endpoints of the object adapter hosting the admin callback objects.

Parameters:

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

Returns:

A template proxy. The returned proxy is null when the Admin session was established using Glacier2.

Return type:

Awaitable[ObjectPrx | None]

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

Gets the name of the registry replica hosting this session.

Parameters:

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

Returns:

The replica name of the registry.

Return type:

str

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

Gets the name of the registry replica hosting this session.

Parameters:

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

Returns:

The replica name of the registry.

Return type:

Awaitable[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

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

Keeps the session alive.

Parameters:

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

Return type:

None

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

Keeps the session 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]

openNodeStdErr(name: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None

Opens a node stderr file for reading.

Parameters:
  • name (str) – The node name.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

FileIteratorPrx | None

Raises:
openNodeStdErrAsync(name: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None]

Opens a node stderr file for reading.

Parameters:
  • name (str) – The node name.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

Awaitable[FileIteratorPrx | None]

openNodeStdOut(name: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None

Opens a node stdout file for reading.

Parameters:
  • name (str) – The node name.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

FileIteratorPrx | None

Raises:
openNodeStdOutAsync(name: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None]

Opens a node stdout file for reading.

Parameters:
  • name (str) – The node name.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

Awaitable[FileIteratorPrx | None]

openRegistryStdErr(name: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None

Opens a registry stderr file for reading.

Parameters:
  • name (str) – The registry name.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

FileIteratorPrx | None

Raises:
openRegistryStdErrAsync(name: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None]

Opens a registry stderr file for reading.

Parameters:
  • name (str) – The registry name.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

Awaitable[FileIteratorPrx | None]

openRegistryStdOut(name: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None

Opens a registry stdout file for reading.

Parameters:
  • name (str) – The registry name.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

FileIteratorPrx | None

Raises:
openRegistryStdOutAsync(name: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None]

Opens a registry stdout file for reading.

Parameters:
  • name (str) – The registry name.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

Awaitable[FileIteratorPrx | None]

openServerLog(id: str, path: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None

Opens a server log file for reading.

Parameters:
  • id (str) – The server ID.

  • path (str) – The path of the log file. A log file can be opened only if it’s declared in the server or service deployment descriptor.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

FileIteratorPrx | None

Raises:
openServerLogAsync(id: str, path: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None]

Opens a server log file for reading.

Parameters:
  • id (str) – The server ID.

  • path (str) – The path of the log file. A log file can be opened only if it’s declared in the server or service deployment descriptor.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

Awaitable[FileIteratorPrx | None]

openServerStdErr(id: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None

Opens a server stderr file for reading.

Parameters:
  • id (str) – The server ID.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

FileIteratorPrx | None

Raises:
openServerStdErrAsync(id: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None]

Opens a server stderr file for reading.

Parameters:
  • id (str) – The server ID.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

Awaitable[FileIteratorPrx | None]

openServerStdOut(id: str, count: int, context: dict[str, str] | None = None) FileIteratorPrx | None

Opens a server stdout file for reading.

Parameters:
  • id (str) – The server id.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

FileIteratorPrx | None

Raises:
openServerStdOutAsync(id: str, count: int, context: dict[str, str] | None = None) Awaitable[FileIteratorPrx | None]

Opens a server stdout file for reading.

Parameters:
  • id (str) – The server id.

  • count (int) – Specifies where to start reading the file. If negative, the file is read from the beginning. Otherwise, the file is read from the last count lines.

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

Returns:

An iterator to read the file. This proxy is never null.

Return type:

Awaitable[FileIteratorPrx | None]

setObservers(registryObs: RegistryObserverPrx | None, nodeObs: NodeObserverPrx | None, appObs: ApplicationObserverPrx | None, adptObs: AdapterObserverPrx | None, objObs: ObjectObserverPrx | None, context: dict[str, str] | None = None) None

Sets the observer proxies that receive notifications when the state of the registry or nodes changes.

Parameters:
Raises:

ObserverAlreadyRegisteredException – Thrown when an observer is already registered with this registry.

Return type:

None

setObserversAsync(registryObs: RegistryObserverPrx | None, nodeObs: NodeObserverPrx | None, appObs: ApplicationObserverPrx | None, adptObs: AdapterObserverPrx | None, objObs: ObjectObserverPrx | None, context: dict[str, str] | None = None) Awaitable[None]

Sets the observer proxies that receive notifications when the state of the registry or nodes changes.

Parameters:
Returns:

An awaitable that is completed when the invocation completes.

Return type:

Awaitable[None]

setObserversByIdentity(registryObs: Identity, nodeObs: Identity, appObs: Identity, adptObs: Identity, objObs: Identity, context: dict[str, str] | None = None) None

Sets the observer identities that receive notifications when the state of the registry or nodes changes. This operation should be used by clients that are using a bidirectional connection to communicate with the session.

Parameters:
  • registryObs (Identity) – The registry observer identity.

  • nodeObs (Identity) – The node observer identity.

  • appObs (Identity) – The application observer.

  • adptObs (Identity) – The adapter observer.

  • objObs (Identity) – The object observer.

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

Raises:

ObserverAlreadyRegisteredException – Thrown when an observer is already registered with this registry.

Return type:

None

setObserversByIdentityAsync(registryObs: Identity, nodeObs: Identity, appObs: Identity, adptObs: Identity, objObs: Identity, context: dict[str, str] | None = None) Awaitable[None]

Sets the observer identities that receive notifications when the state of the registry or nodes changes. This operation should be used by clients that are using a bidirectional connection to communicate with the session.

Parameters:
  • registryObs (Identity) – The registry observer identity.

  • nodeObs (Identity) – The node observer identity.

  • appObs (Identity) – The application observer.

  • adptObs (Identity) – The adapter observer.

  • objObs (Identity) – The object observer.

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

Returns:

An awaitable that is completed when the invocation completes.

Return type:

Awaitable[None]

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

Acquires an exclusive lock to start updating the registry applications.

Parameters:

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

Returns:

The current serial.

Return type:

int

Raises:

AccessDeniedException – Thrown when the exclusive lock can’t be acquired. This might happen if the lock is currently acquired by another session.

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

Acquires an exclusive lock to start updating the registry applications.

Parameters:

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

Returns:

The current serial.

Return type:

Awaitable[int]

static uncheckedCast(proxy: ObjectPrx, facet: str | None = None) AdminSessionPrx
static uncheckedCast(proxy: None, facet: str | None = None) 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