IceGrid.FileIteratorPrx

class IceGrid.FileIteratorPrx

Bases: ObjectPrx

Iterates over an IceGrid log file.

Notes

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

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

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

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

read(size: int, context: dict[str, str] | None = None) tuple[bool, list[str]]

Read lines from the log file.

Parameters:
  • size (int) – Specifies the maximum number of bytes to be received. The server will ensure that the returned message doesn’t exceed the given size.

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

Returns:

A tuple containing:
  • bool true if EOF is encountered.

  • list[str] The lines read from the file. If there was nothing to read from the file since the last call to read, an empty sequence is returned. The last line of the sequence is always incomplete (and therefore no newline character should be added when writing the last line to the to the output device).

Return type:

tuple[bool, list[str]]

Raises:

FileNotAvailableException – Thrown when the implementation failed to read from the file.

readAsync(size: int, context: dict[str, str] | None = None) Awaitable[tuple[bool, list[str]]]

Read lines from the log file.

Parameters:
  • size (int) – Specifies the maximum number of bytes to be received. The server will ensure that the returned message doesn’t exceed the given size.

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

Returns:

A tuple containing:
  • bool true if EOF is encountered.

  • list[str] The lines read from the file. If there was nothing to read from the file since the last call to read, an empty sequence is returned. The last line of the sequence is always incomplete (and therefore no newline character should be added when writing the last line to the to the output device).

Return type:

Awaitable[tuple[bool, list[str]]]

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