IceGrid.AdminSession¶
- class IceGrid.AdminSession¶
-
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:
- 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:
- 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:
- static ice_staticId() str¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
- 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
countlines.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:
FileNotAvailableException – Thrown when the file can’t be read.
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- 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
countlines.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:
FileNotAvailableException – Thrown when the file can’t be read.
NodeNotExistException – Thrown when the node doesn’t exist.
NodeUnreachableException – Thrown when the node is unreachable.
- 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
countlines.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:
FileNotAvailableException – Thrown when the file can’t be read.
RegistryNotExistException – Thrown when the registry doesn’t exist.
RegistryUnreachableException – Thrown when the registry is unreachable.
- 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
countlines.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:
FileNotAvailableException – Thrown when the file can’t be read.
RegistryNotExistException – Thrown when the registry doesn’t exist.
RegistryUnreachableException – Thrown when the registry is unreachable.
- 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
countlines.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:
DeploymentException – Thrown when the server couldn’t be deployed on the node.
FileNotAvailableException – Thrown when the file can’t be read.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- 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
countlines.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:
DeploymentException – Thrown when the server couldn’t be deployed on the node.
FileNotAvailableException – Thrown when the file can’t be read.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- 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
countlines.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:
DeploymentException – Thrown when the server couldn’t be deployed on the node.
FileNotAvailableException – Thrown when the file can’t be read.
NodeUnreachableException – Thrown when the node is unreachable.
ServerNotExistException – Thrown when the server doesn’t exist.
- 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:
registryObs (RegistryObserverPrx | None) – The registry observer.
nodeObs (NodeObserverPrx | None) – The node observer.
appObs (ApplicationObserverPrx | None) – The application observer.
adptObs (AdapterObserverPrx | None) – The adapter observer.
objObs (ObjectObserverPrx | None) – 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 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:
- 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:
- Raises:
AccessDeniedException – Thrown when the exclusive lock can’t be acquired. This might happen if the lock is currently acquired by another session.