Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IExecutable

Interface for components that can be called to execute work.

see

Executor

see

INotifiable

see

Parameters

Example

class EchoComponent implements IExecutable {
    ...
    public execute(correlationId: string, args: Parameters, callback: (err: any, result: any) => void): void {
        let result = args.getAsObject("message");
        callback(null, result);
    }
}

let echo = new EchoComponent();
let message = "Test";
echo.execute("123", Parameters.fromTuples("message", message),
    (err, result) => {
        console.log("Request: " + message + " Response: " + result);
    }
);

Hierarchy

Index

Methods

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

Generated using TypeDoc