Class LocalBus<TEvent>

Non-connectable event bus implementation. Can forward events to the main Bus instance.

Type Parameters

Hierarchy

Implements

Constructors

Properties

awareOfContainerLifecycle: true = ...
bus: Bus<Event>
isUp: boolean = false

True if the bus has been initialized.

logging: Logging
subscribers: Collection<BusSubscriber<TEvent>> = ...

Local listeners subscribed to events on this bus.

subscriptions: Collection<BusInternalSubscription> = ...
uuid: string = ...

Accessors

Methods

  • Protected

    Call all local listeners for the given event. Returns true if the propagation of the event should be halted.

    Parameters

    • event: TEvent

    Returns Promise<boolean>

  • Get the method with the given name from this class, bound to this class.

    Returns

    function

    Parameters

    • methodName: string

    Returns ((...args: any[]) => any)

      • (...args: any[]): any
      • Get the method with the given name from this class, bound to this class.

        Returns

        function

        Parameters

        • Rest ...args: any[]

        Returns any

  • Call the make() method on the global container.

    Type Parameters

    • T

    Parameters

    • target: any
    • Rest ...parameters: any[]

    Returns T

  • Returns true if the given event should be pushed to connected event busses.

    Parameters

    • event: TEvent

    Returns Promise<boolean>

  • Sets the fully- and un-qualified canonical resolver strings. Intended for use by the Canonical unit.

    Parameters

    • fullyQualifiedResolver: string
    • unqualifiedResolver: string

    Returns void