registerCallback

suspend fun <T : Any> registerCallback(callbackGroup: Any, eventType: EventType<T>, callback: EventCallback<T>): RegistrationResult

Registers single callback for a specified event type. If you need to register multiple callbacks simultaneously, consider using the registerManyCallbacks.

Parameters

T

type of data passed to callback

callbackGroup

An identifier used to group related callbacks

eventType

type of event to listen to

callback

a block of code to execute when event was handled

Throws

thrown when method encounters an exception during subscribing on channel