Skip to main content
Version: Next

LocalEventManager

Hierarchy

Index

Constructors

constructor

Methods

inheritedclose

  • close(): Promise<void>
  • Stops the persistState event interval and emits the final persistState event. The next on() call starts the manager again.


    Returns Promise<void>

inheritedemit

  • emit(event, ...args): void
  • Parameters

    Returns void

inheritedinit

  • init(): Promise<void>
  • Takes over the lifecycle of the event manager: whoever calls this is expected to call close() as well. Without it, the manager starts itself with the first listener and emits a final persistState event before the process exits.

    A subclass that needs to await something to start (e.g. a connection) does so here, which is why such a manager has to be initialized explicitly.


    Returns Promise<void>

inheritedisInitialized

  • isInitialized(): boolean
  • Returns boolean

off

  • off(event, listener): void
  • Parameters

    Returns void

on

  • on(event, listener): void
  • The systemInfo events are only emitted while something listens to them, as collecting them is not free.


    Parameters

    Returns void

staticfromConfiguration

  • Creates a new LocalEventManager based on the provided Configuration. Uses the global configuration from the service locator if none is provided.


    Parameters

    Returns LocalEventManager