subscribe
Registers all instance methods on subscriber annotated with @Subscribe.
Calling this with the same object more than once is idempotent; already-registered handlers are not duplicated.
Registers a lambda handler for eventClass and returns a Subscription token.
Kotlin callers should prefer the reified inline overload:
val sub = bus.subscribe<MyEvent>(async = true) { e -> handle(e) }Return
a Subscription whose Subscription.cancel removes this handler.
Parameters
If true, dispatches on the bus's executor; falls back to sync if none configured.
Registers a lambda handler for eventClass with synchronous dispatch.
Preserves binary compatibility with callers that predate the async parameter.
Return
a Subscription whose Subscription.cancel removes this handler.
Registers a Consumer handler for eventClass and returns a Subscription token.
Java callers use plain void lambdas:
Subscription sub = bus.subscribe(MyEvent.class, Priority.NORMAL, true, e -> handle(e));Return
a Subscription whose Subscription.cancel removes this handler.
Parameters
If true, dispatches on the bus's executor; falls back to sync if none configured.
Registers a Consumer handler for eventClass with synchronous dispatch.
Preserves binary compatibility with callers that predate the async parameter.
Return
a Subscription whose Subscription.cancel removes this handler.