subscribe Static
Registers all static handler methods declared on the reified type T.
This is a Kotlin convenience overload of subscribeStatic that allows static handlers to be registered using a reified type parameter instead of explicitly passing a KClass or Class reference.
The function discovers and registers all static (or @JvmStatic) functions on T annotated with EventHandler or ExceptionHandler and having a supported signature.
Static handlers:
do not require an instance,
are strongly referenced,
remain active until explicitly removed via unsubscribeStatic.
Calling this function more than once for the same type is a no-op.
Example
bus.subscribeStatic<MyStaticHandlers>()Content copied to clipboard
Receiver
the Bus to which the static handlers declared on T will be registered.
Parameters
T
the class containing static handler methods to register.