Ice.InitializationData

class Ice.InitializationData(properties: Properties | None = None, logger: Logger | None = None, threadStart: Callable[[], None] | None = None, threadStop: Callable[[], None] | None = None, executor: Callable[[Callable[[], None], Connection], None] | None = None, batchRequestInterceptor: Callable[[BatchRequest, int, int], None] | None = None, eventLoopAdapter: EventLoopAdapter | None = None, sliceLoader: Callable[[str], Value | UserException | None] | None = None)

Bases: object

The attributes of this class are used to initialize a new communicator instance.

Parameters:
properties

The properties to use for the communicator.

Type:

Ice.Properties | None

logger

The logger to use for the communicator.

Type:

Logger | None

threadStart

A callable that is invoked for each new Ice thread that is started.

Type:

Callable[[], None] | None

threadStop

A callable that is invoked when an Ice thread is stopped.

Type:

Callable[[], None] | None

executor

A callable that is invoked when Ice needs to execute an activity. The callable receives two arguments: a callable and an Ice.Connection object. The executor must eventually invoke the callable with no arguments.

Type:

Callable[[Callable[[], None], Connection], None] | None

batchRequestInterceptor

A callable that will be invoked when a batch request is queued. The callable receives three arguments: a BatchRequest object, an integer representing the number of requests in the queue, and an integer representing the number of bytes consumed by the requests in the queue. The interceptor must eventually invoke the enqueue method on the BatchRequest object.

Type:

Callable[[BatchRequest, int, int], None] | None

eventLoopAdapter

An event loop adapter used to run coroutines and wrap futures. If provided. This adapter is responsible for executing coroutines returned by Ice asynchronous dispatch methods and for wrapping Ice futures (from Ice Async APIs) into futures that can be awaited in the application’s event loop.

Type:

Ice.EventLoopAdapter | None

sliceLoader

A callable that creates class and exception instances from Slice type IDs. The callable receives a type ID or compact type ID as a string argument and returns a new instance of the class or exception identified by this ID. The implementation returns None when it cannot find the corresponding class.

Type:

Callable[[str], Value | UserException | None] | None