CallbackHandlerRegistry


class CallbackHandlerRegistry


The holder for callbacks that are tagged with RemoteCallable. Note: This should only be referenced by generated code, there is no reason to reference this otherwise.

Summary

Nested types

The interface used to trigger a callback when the pending intent is fired.

Public constructors

Public functions

Unit
<T : CallbackReceiver?> invokeCallback(
    context: Context!,
    receiver: T!,
    intent: Intent!
)

Trigger a call to a callback using arguments that were generated with getArgumentBundle.

Unit
<T : CallbackReceiver?> invokeCallback(
    context: Context!,
    receiver: T!,
    bundle: Bundle!
)

Trigger a call to a callback using arguments that were generated with getArgumentBundle.

java-static Unit
<T : CallbackReceiver?> registerCallbackHandler(
    cls: Class<T!>!,
    method: String!,
    handler: CallbackHandlerRegistry.CallbackHandler<T!>!
)

Registers a callback handler to be executed when a given PendingIntent is fired for a RemoteCallback.

java-static RemoteCallback!
stubToRemoteCallback(
    receiver: CallbackReceiver!,
    cls: Class<CallbackReceiver!>!,
    args: Bundle!,
    method: String!
)

Turns a callback receiver stub into a remote callback.

Public constructors

CallbackHandlerRegistry

Added in 1.0.0-alpha02
CallbackHandlerRegistry()

Public functions

invokeCallback

Added in 1.0.0-alpha02
fun <T : CallbackReceiver?> invokeCallback(
    context: Context!,
    receiver: T!,
    intent: Intent!
): Unit

Trigger a call to a callback using arguments that were generated with getArgumentBundle.

invokeCallback

Added in 1.0.0-alpha02
fun <T : CallbackReceiver?> invokeCallback(
    context: Context!,
    receiver: T!,
    bundle: Bundle!
): Unit

Trigger a call to a callback using arguments that were generated with getArgumentBundle.

registerCallbackHandler

Added in 1.0.0-alpha02
java-static fun <T : CallbackReceiver?> registerCallbackHandler(
    cls: Class<T!>!,
    method: String!,
    handler: CallbackHandlerRegistry.CallbackHandler<T!>!
): Unit

Registers a callback handler to be executed when a given PendingIntent is fired for a RemoteCallback. Note: This should only be called by generated code, there is no reason to reference this otherwise.

stubToRemoteCallback

Added in 1.0.0-alpha02
java-static fun stubToRemoteCallback(
    receiver: CallbackReceiver!,
    cls: Class<CallbackReceiver!>!,
    args: Bundle!,
    method: String!
): RemoteCallback!

Turns a callback receiver stub into a remote callback. Note: This should only be called by generated code, there is no reason to reference this otherwise.