1 | import { AutomationClient } from "../automationClient";
|
2 | import { EventFired } from "../HandleEvent";
|
3 | import { HandlerContext } from "../HandlerContext";
|
4 | import { HandlerResult } from "../HandlerResult";
|
5 | import { CommandInvocation } from "../internal/invoker/Payload";
|
6 | import { CommandIncoming, EventIncoming, RequestProcessor } from "../internal/transport/RequestProcessor";
|
7 | import { Destination, MessageOptions } from "../spi/message/MessageClient";
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export interface AutomationEventListener {
|
14 | |
15 |
|
16 |
|
17 |
|
18 | registrationSuccessful(handler: RequestProcessor): void;
|
19 | |
20 |
|
21 |
|
22 |
|
23 | startupSuccessful?(client: AutomationClient): Promise<void>;
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 | contextCreated(context: HandlerContext): void;
|
30 | |
31 |
|
32 |
|
33 |
|
34 | commandIncoming(payload: CommandIncoming): void;
|
35 | |
36 |
|
37 |
|
38 |
|
39 |
|
40 | commandStarting(payload: CommandInvocation, ctx: HandlerContext): void;
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | commandSuccessful(payload: CommandInvocation, ctx: HandlerContext, result: HandlerResult): Promise<void>;
|
48 | |
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | commandFailed(payload: CommandInvocation, ctx: HandlerContext, err: any): Promise<void>;
|
55 | |
56 |
|
57 |
|
58 |
|
59 | eventIncoming(payload: EventIncoming): void;
|
60 | |
61 |
|
62 |
|
63 |
|
64 |
|
65 | eventStarting(payload: EventFired<any>, ctx: HandlerContext): void;
|
66 | |
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 | eventSuccessful(payload: EventFired<any>, ctx: HandlerContext, result: HandlerResult[]): Promise<void>;
|
73 | |
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 | eventFailed(payload: EventFired<any>, ctx: HandlerContext, err: any): Promise<void>;
|
80 | |
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 | messageSending(message: any, destinations: Destination | Destination[], options: MessageOptions, ctx: HandlerContext): Promise<{
|
88 | message: any;
|
89 | destinations: Destination | Destination[];
|
90 | options: MessageOptions;
|
91 | }>;
|
92 | |
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | messageSent(message: any, destinations: Destination | Destination[], options: MessageOptions, ctx: HandlerContext): Promise<void>;
|
100 | }
|
101 | export declare class AutomationEventListenerSupport implements AutomationEventListener {
|
102 | registrationSuccessful(handler: RequestProcessor): void;
|
103 | startupSuccessful(client: AutomationClient): Promise<void>;
|
104 | contextCreated(context: HandlerContext): void;
|
105 | commandIncoming(payload: CommandIncoming): void;
|
106 | commandStarting(payload: CommandInvocation, ctx: HandlerContext): void;
|
107 | commandSuccessful(payload: CommandInvocation, ctx: HandlerContext, result: HandlerResult): Promise<void>;
|
108 | commandFailed(payload: CommandInvocation, ctx: HandlerContext, err: any): Promise<void>;
|
109 | eventIncoming(payload: EventIncoming): void;
|
110 | eventStarting(payload: EventFired<any>, ctx: HandlerContext): void;
|
111 | eventSuccessful(payload: EventFired<any>, ctx: HandlerContext, result: HandlerResult[]): Promise<void>;
|
112 | eventFailed(payload: EventFired<any>, ctx: HandlerContext, err: any): Promise<void>;
|
113 | messageSending(message: any, destinations: Destination | Destination[], options: MessageOptions, ctx: HandlerContext): Promise<{
|
114 | message: any;
|
115 | destinations: Destination | Destination[];
|
116 | options: MessageOptions;
|
117 | }>;
|
118 | messageSent(message: any, destinations: Destination | Destination[], options: MessageOptions, ctx: HandlerContext): Promise<void>;
|
119 | }
|
120 |
|
\ | No newline at end of file |