Container pattern for managing multiple Future operations in KOS models.
Provides comprehensive Future management capabilities for models that handle multiple concurrent long-running operations with centralized lifecycle management.
@kosModel("device-operations-model")export class DeviceOperationsModel implements FutureContainer { futureHandler: FutureAwareContainer; constructor(modelId: string, options: any, context: KosCreationContext) { this.id = modelId; this.futureHandler = new FutureHandler(this); } onFutureUpdate(future: IFutureModel): void { // Handle progress updates from any managed Future console.log(`Operation ${future.id}: ${future.progress}%`); }} Copy
@kosModel("device-operations-model")export class DeviceOperationsModel implements FutureContainer { futureHandler: FutureAwareContainer; constructor(modelId: string, options: any, context: KosCreationContext) { this.id = modelId; this.futureHandler = new FutureHandler(this); } onFutureUpdate(future: IFutureModel): void { // Handle progress updates from any managed Future console.log(`Operation ${future.id}: ${future.progress}%`); }}
Container pattern for managing multiple Future operations in KOS models.
Provides comprehensive Future management capabilities for models that handle multiple concurrent long-running operations with centralized lifecycle management.
Example: Basic Future Container