subscribe
fun <TCallback : ICallbackMsg> subscribe(callbackType: Class<out TCallback>, jobID: JobID, callbackFunc: Consumer<TCallback>): Closeable
Registers the provided Consumer to receive callbacks of type TCallback
Return
An Closeable. Disposing of the return value will unsubscribe the callbackFunc .
Parameters
TCallback
The type of callback to subscribe to. If this is JobID.INVALID, all callbacks of type TCallback will be received.
callback Type
The type of the callback
job ID
The JobID of the callbacks that should be subscribed to.
callback Func
The function to invoke with the callback.
fun <TCallback : ICallbackMsg> subscribe(callbackType: Class<out TCallback>, callbackFunc: Consumer<TCallback>): Closeable
Registers the provided Consumer to receive callbacks of type TCallback
Return
An Closeable. Disposing of the return value will unsubscribe the callbackFunc.
Parameters
TCallback
The type of callback to subscribe to.
callback Type
type of the callback
callback Func
The function to invoke with the callback.