1 | import { Parameters } from './Parameters';
|
2 | /**
|
3 | * Helper class that executes components.
|
4 | *
|
5 | * [[IExecutable]]
|
6 | */
|
7 | export declare class Executor {
|
8 | /**
|
9 | * Executes specific component.
|
10 | *
|
11 | * To be executed components must implement [[IExecutable]] interface.
|
12 | * If they don't the call to this method has no effect.
|
13 | *
|
14 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
15 | * @param component the component that is to be executed.
|
16 | * @param args execution arguments.
|
17 | * @param callback callback function that receives execution result or error.
|
18 | *
|
19 | * @see [[IExecutable]]
|
20 | * @see [[Parameters]]
|
21 | */
|
22 | static executeOne(correlationId: string, component: any, args: Parameters, callback: (err: any, result: any) => void): any;
|
23 | /**
|
24 | * Executes multiple components.
|
25 | *
|
26 | * To be executed components must implement [[IExecutable]] interface.
|
27 | * If they don't the call to this method has no effect.
|
28 | *
|
29 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
30 | * @param components a list of components that are to be executed.
|
31 | * @param args execution arguments.
|
32 | * @param callback callback function that receives execution result or error.
|
33 | *
|
34 | * @see [[executeOne]]
|
35 | * @see [[IExecutable]]
|
36 | * @see [[Parameters]]
|
37 | */
|
38 | static execute(correlationId: string, components: any[], args: Parameters, callback: (err: any, results: any[]) => void): void;
|
39 | }
|