An interface for listener objects that receive notifications on fired events.
IEvent
Event
export class MyListener implements IEventListener { private onEvent(correlationId: string, event: IEvent, args: Parameters): void { console.log("Fired event " + event.getName()); } } let event = new Event("myevent"); event.addListener(new MyListener()); event.notify("123", Parameters.fromTuples("param1", "ABC")); // Console output: Fired event myevent
A method called when events this listener is subscrubed to are fired.
(optional) transaction id to trace execution through call chain.
a fired evemt
event arguments.
Generated using TypeDoc
An interface for listener objects that receive notifications on fired events.
IEvent
Event
Example
export class MyListener implements IEventListener { private onEvent(correlationId: string, event: IEvent, args: Parameters): void { console.log("Fired event " + event.getName()); } } let event = new Event("myevent"); event.addListener(new MyListener()); event.notify("123", Parameters.fromTuples("param1", "ABC")); // Console output: Fired event myevent