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:
objectRepresents a set of options that you can specify when initializing a communicator.
- Parameters:
properties (Properties | None)
logger (Logger | None)
threadStart (Callable[[], None] | None)
threadStop (Callable[[], None] | None)
executor (Callable[[Callable[[], None], Connection], None] | None)
batchRequestInterceptor (Callable[[BatchRequest, int, int], None] | None)
eventLoopAdapter (EventLoopAdapter | None)
sliceLoader (Callable[[str], Value | UserException | None] | None)
- properties¶
The properties for the communicator. If not
None, this corresponds to the object returned by theCommunicator.getProperties()function.- Type:
Ice.Properties | None
- logger¶
The logger for the communicator.
- Type:
Ice.Logger | None
- threadStart¶
A
Callablethat is invoked whenever the communicator starts a new thread.- Type:
Callable[[], None] | None
- threadStop¶
A
Callablethat is invoked whenever a thread created by the communicator is about to be destroyed.- Type:
Callable[[], None] | None
- executor¶
A
Callablethat the communicator invokes to execute dispatches and async invocation callbacks. 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
Callablethat is invoked by the Ice runtime to enqueue a batch request. The callable receives three arguments: a BatchRequest object, an integer representing the number of requests currently 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 function on the BatchRequest object.- Type:
Callable[[Ice.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 functions 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
Callableused to create instances of Slice classes and user exceptions. Applications can supply a custom slice loader that the Ice runtime will use during unmarshaling. The callable receives one argument: a type ID or compact type ID (as a string) and returns a new instance of the corresponding class or exception, orNoneif no such class or exception could be found.- Type:
Callable[[str], Ice.Value | Ice.UserException | None] | None