LocalEventManager
Hierarchy
- EventManager
- LocalEventManager
Index
Constructors
Methods
Constructors
constructor
Parameters
options: LocalEventManagerOptions
Returns LocalEventManager
Methods
inheritedclose
Returns Promise<void>
inheritedemit
Parameters
event: EventTypeName
rest...args: unknown[]
Returns void
inheritedinit
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 finalpersistStateevent 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
Returns boolean
off
Parameters
event: EventTypeName
optionallistener: (...args) => any
Returns void
on
The
systemInfoevents are only emitted while something listens to them, as collecting them is not free.Parameters
event: EventTypeName
listener: (...args) => any
Returns void
staticfromConfiguration
Creates a new
LocalEventManagerbased on the providedConfiguration. Uses the global configuration from the service locator if none is provided.Parameters
optionalconfiguration: Configuration
Returns LocalEventManager
Stops the
persistStateevent interval and emits the finalpersistStateevent. The nexton()call starts the manager again.