1 | import { ConfigParams } from 'pip-services3-commons-node';
|
2 | import { IReconfigurable } from 'pip-services3-commons-node';
|
3 | import { INotifiable } from 'pip-services3-commons-node';
|
4 | import { IConfigReader } from './IConfigReader';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | export declare class MemoryConfigReader implements IConfigReader, IReconfigurable {
|
35 | protected _config: ConfigParams;
|
36 | |
37 |
|
38 |
|
39 |
|
40 |
|
41 | constructor(config?: ConfigParams);
|
42 | /**
|
43 | * Configures component by passing configuration parameters.
|
44 | *
|
45 | * @param config configuration parameters to be set.
|
46 | */
|
47 | configure(config: ConfigParams): void;
|
48 | /**
|
49 | * Reads configuration and parameterize it with given values.
|
50 | *
|
51 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
52 | * @param parameters values to parameters the configuration or null to skip parameterization.
|
53 | * @param callback callback function that receives configuration or error.
|
54 | */
|
55 | readConfig(correlationId: string, parameters: ConfigParams, callback: (err: any, config: ConfigParams) => void): void;
|
56 | /**
|
57 | * Adds a listener that will be notified when configuration is changed
|
58 | * @param listener a listener to be added.
|
59 | */
|
60 | addChangeListener(listener: INotifiable): void;
|
61 | /**
|
62 | * Remove a previously added change listener.
|
63 | * @param listener a listener to be removed.
|
64 | */
|
65 | removeChangeListener(listener: INotifiable): void;
|
66 | }
|