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
| Runtime |
Methods
| get |
Gets or initializes the data client |
| get |
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<IRuntimeDataClient>
Promise resolving to IRuntimeDataClient
getMetadataClientAsync()
Gets or initializes the metadata client
function getMetadataClientAsync(): Promise<IRuntimeMetadataClient>
Returns
Promise<IRuntimeMetadataClient>
Promise resolving to IRuntimeMetadataClient
reset()
Resets both clients, forcing re-initialization on next use Useful for testing or recovering from error states
function reset()