Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Executor

Helper class that executes components.

IExecutable

Hierarchy

  • Executor

Index

Methods

Static execute

  • execute(correlationId: string, components: any[], args: Parameters, callback: function): void
  • Executes multiple components.

    To be executed components must implement IExecutable interface. If they don't the call to this method has no effect.

    see

    executeOne

    see

    IExecutable

    see

    Parameters

    Parameters

    • correlationId: string

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

    • components: any[]

      a list of components that are to be executed.

    • args: Parameters

      execution arguments.

    • callback: function

      callback function that receives execution result or error.

        • (err: any, results: any[]): void
        • Parameters

          • err: any
          • results: any[]

          Returns void

    Returns void

Static executeOne

  • executeOne(correlationId: string, component: any, args: Parameters, callback: function): any
  • Executes specific component.

    To be executed components must implement IExecutable interface. If they don't the call to this method has no effect.

    see

    IExecutable

    see

    Parameters

    Parameters

    • correlationId: string

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

    • component: any

      the component that is to be executed.

    • 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 any

Generated using TypeDoc