hosanna-ui-docs - v0.9.0
    Preparing search index...

    Class AsyncCommand

    Represents an asynchronous command with lifecycle management.

    • Supports dispatch, cancel, pause, and resume operations.
    • Integrates with async command handlers and cancellation tokens.
    • Implements the IReusable interface for pooling.

    Implements

    Index

    Constructors

    Properties

    _asyncToken: any

    Internal async token for cancellation or tracking.

    _cacheKey: string = 'AsyncCommand'

    IReusable implementation: cache key for pooling.

    _handler: string = ''

    The handler name for the command, derived from the command string.

    _hid: string = ...

    Internal unique identifier for the command.

    _scope: string = ''

    The scope of the command, derived from the command string.

    args?: any

    Arguments for the command.

    assignedTask?: ISGNTask

    Task assigned to this command, if any.

    asyncCommandHandler: IAsyncCommandHandler

    Injected async command handler.

    callback: any

    Callback for command completion or progress.

    command: string = ''

    The command string, e.g., 'scope.command'.

    id: string = ...

    Unique identifier for the command.

    onEventCallback?: AsyncCommandEventCallback

    Callback for async command events.

    progress: number = 0.0

    Progress value (0.0 to 1.0).

    promise?: HsPromise<unknown>

    Promise associated with the command's async operation.

    result: any

    Result of the command execution.

    state: AsyncCommandState = AsyncCommandState.Initializing

    Current state of the command.

    Methods