IceGrid.AdminSession

class IceGrid.AdminSession

Bases: Session, ABC

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

Notes

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

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

Finishes updating the registry and releases the exclusive lock.

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:

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

abstractmethod getAdmin(current: Current) AdminPrx | 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:

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

Returns:

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

Return type:

AdminPrx | None | Awaitable[AdminPrx | None]

abstractmethod getAdminCallbackTemplate(current: Current) ObjectPrx | 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:

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

Returns:

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

Return type:

ObjectPrx | None | Awaitable[ObjectPrx | None]

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

Gets the name of the registry replica hosting this session.

Parameters:

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

Returns:

The replica name of the registry.

Return type:

str | Awaitable[str]

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str

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

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

abstractmethod openNodeStdErr(name: str, count: int, current: Current) FileIteratorPrx | 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.

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

Returns:

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

Return type:

FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]

Raises:
abstractmethod openNodeStdOut(name: str, count: int, current: Current) FileIteratorPrx | 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.

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

Returns:

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

Return type:

FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]

Raises:
abstractmethod openRegistryStdErr(name: str, count: int, current: Current) FileIteratorPrx | 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.

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

Returns:

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

Return type:

FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]

Raises:
abstractmethod openRegistryStdOut(name: str, count: int, current: Current) FileIteratorPrx | 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.

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

Returns:

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

Return type:

FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]

Raises:
abstractmethod openServerLog(id: str, path: str, count: int, current: Current) FileIteratorPrx | 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.

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

Returns:

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

Return type:

FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]

Raises:
abstractmethod openServerStdErr(id: str, count: int, current: Current) FileIteratorPrx | 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.

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

Returns:

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

Return type:

FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]

Raises:
abstractmethod openServerStdOut(id: str, count: int, current: Current) FileIteratorPrx | 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.

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

Returns:

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

Return type:

FileIteratorPrx | None | Awaitable[FileIteratorPrx | None]

Raises:
abstractmethod setObservers(registryObs: RegistryObserverPrx | None, nodeObs: NodeObserverPrx | None, appObs: ApplicationObserverPrx | None, adptObs: AdapterObserverPrx | None, objObs: ObjectObserverPrx | None, current: Current) None | Awaitable[None]

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

Parameters:
Returns:

None or an awaitable that completes when the dispatch completes.

Return type:

None | Awaitable[None]

Raises:

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

abstractmethod setObserversByIdentity(registryObs: Identity, nodeObs: Identity, appObs: Identity, adptObs: Identity, objObs: Identity, current: Current) 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.

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

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

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

Acquires an exclusive lock to start updating the registry applications.

Parameters:

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

Returns:

The current serial.

Return type:

int | Awaitable[int]

Raises:

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