Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EntityMessageBroker

Hierarchy

  • EntityMessageBroker

Index

Constructors

Methods

Constructors

constructor

Methods

emit

  • emit(topic: string, data?: any): Subject<any>
  • Returns EndlessSubject representing given topic

    example

    const broker = EntityMessageBroker.getInstance(); const subject = broker.emit('test.topic', data);

    Parameters

    • topic: string
    • Default value data: any = {}

    Returns Subject<any>

on

  • on(name: any): Observable<any>
  • Get an Observable for specific set of topics

    example

    const broker = EntityMessageBroker.getInstance(); broker.on('Candidate.child_added') .subscribe((res) => { // default Observable subscription // handle results });

    Parameters

    • name: any

      Topic name / pattern

    Returns Observable<any>

    Rx.Observable for given set of topics

subject

  • subject(name: any): Subject<any>
  • Returns EndlessSubject representing given topic

    example

    const broker = EntityMessageBroker.getInstance(); const subject = broker.subject('test.topic');

    Parameters

    • name: any

      Topic name

    Returns Subject<any>

Static getInstance

Generated using TypeDoc