Share via


RuntimeClientProvider class

RuntimeClientProvider manages the lifecycle of runtime clients for data and metadata operations. Implements a lazy initialization pattern for clients and ensures proper error handling.

Constructors

RuntimeClientProvider(IPowerOperationExecutor)

Methods

getDataClientAsync()

Gets or initializes the data client

getMetadataClientAsync()

Gets or initializes the metadata client

reset()

Resets both clients, forcing re-initialization on next use Useful for testing or recovering from error states

Constructor Details

RuntimeClientProvider(IPowerOperationExecutor)

new RuntimeClientProvider(powerOperationExecutor: IPowerOperationExecutor)

Parameters

powerOperationExecutor
IPowerOperationExecutor

Method Details

getDataClientAsync()

Gets or initializes the data client

function getDataClientAsync(): Promise<IRuntimeDataClient>

Returns

Promise resolving to IRuntimeDataClient

getMetadataClientAsync()

Gets or initializes the metadata client

function getMetadataClientAsync(): Promise<IRuntimeMetadataClient>

Returns

Promise resolving to IRuntimeMetadataClient

reset()

Resets both clients, forcing re-initialization on next use Useful for testing or recovering from error states

function reset()