Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICommand

An interface for Commands, which are part of the Command design pattern. Each command wraps a method or function and allows to call them in uniform and safe manner.

see

Command

see

IExecutable

see

ICommandInterceptor

see

InterceptedCommand

Hierarchy

Implemented by

Index

Methods

execute

  • execute(correlationId: string, args: Parameters, callback: function): void
  • Executes component with arguments and receives execution result.

    Parameters

    • correlationId: string

      (optional) transaction id to trace execution through call chain.

    • args: Parameters

      execution arguments.

    • callback: function

      callback function that receives execution result or error.

        • (err: any, result: any): void
        • Parameters

          • err: any
          • result: any

          Returns void

    Returns void

getName

  • getName(): string
  • Gets the command name.

    Returns string

    the command name.

validate

  • Validates command arguments before execution using defined schema.

    see

    Parameters

    see

    ValidationResult

    Parameters

    • args: Parameters

      the parameters (arguments) to validate.

    Returns ValidationResult[]

    an array of ValidationResults.

Generated using TypeDoc