CallbackHandlerRegistry


public 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

This interface is deprecated. Deprecated in Java

Public constructors

This method is deprecated. Deprecated in Java

Public methods

void
<T extends CallbackReceiver> invokeCallback(
    @NonNull Context context,
    T receiver,
    @NonNull Intent intent
)

This method is deprecated. Deprecated in Java

void
<T extends CallbackReceiver> invokeCallback(
    @NonNull Context context,
    T receiver,
    @NonNull Bundle bundle
)

This method is deprecated. Deprecated in Java

static void
<T extends CallbackReceiver> registerCallbackHandler(
    @NonNull Class<T> cls,
    @NonNull String method,
    @Nullable CallbackHandlerRegistry.CallbackHandler<T> handler
)

This method is deprecated. Deprecated in Java

static @Nullable RemoteCallback
stubToRemoteCallback(
    @NonNull CallbackReceiver receiver,
    @NonNull Class<CallbackReceiver> cls,
    @NonNull Bundle args,
    @Nullable String method
)

This method is deprecated. Deprecated in Java

Public constructors

CallbackHandlerRegistry

Added in 1.0.0-alpha03
Deprecated in 1.0.0-alpha03
public CallbackHandlerRegistry()

Public methods

invokeCallback

Added in 1.0.0-alpha03
Deprecated in 1.0.0-alpha03
public void <T extends CallbackReceiver> invokeCallback(
    @NonNull Context context,
    T receiver,
    @NonNull Intent intent
)

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

invokeCallback

Added in 1.0.0-alpha03
Deprecated in 1.0.0-alpha03
public void <T extends CallbackReceiver> invokeCallback(
    @NonNull Context context,
    T receiver,
    @NonNull Bundle bundle
)

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

registerCallbackHandler

Added in 1.0.0-alpha03
Deprecated in 1.0.0-alpha03
public static void <T extends CallbackReceiver> registerCallbackHandler(
    @NonNull Class<T> cls,
    @NonNull String method,
    @Nullable CallbackHandlerRegistry.CallbackHandler<T> handler
)

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-alpha03
Deprecated in 1.0.0-alpha03
public static @Nullable RemoteCallback stubToRemoteCallback(
    @NonNull CallbackReceiver receiver,
    @NonNull Class<CallbackReceiver> cls,
    @NonNull Bundle args,
    @Nullable String method
)

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.