TriggerRegistry

Central registry of all live triggers, indexed by type. Registration happens while a module's main() runs (JS thread); lookups happen on whatever thread an event fires on, so everything is held in concurrent collections.

Functions

Link copied to clipboard
Link copied to clipboard

All enabled triggers of a type, in priority order (lowest priority value first).

Link copied to clipboard
fun clear()
Link copied to clipboard
Link copied to clipboard
fun count(): Int
Link copied to clipboard
fun countForModule(module: String): Int
Link copied to clipboard
fun get(id: Int): TriggerMeta?
Link copied to clipboard
fun hasType(type: String): Boolean

Cheap check (no list allocation) for whether any enabled trigger of type exists.

Link copied to clipboard
fun register(type: String, module: JimModule?, callback: JimCallback): TriggerMeta
Link copied to clipboard
fun reindex(meta: TriggerMeta)
Link copied to clipboard
fun removeModule(module: String)

Remove every trigger owned by a module (clean unload).

Link copied to clipboard
fun unregister(id: Int)