Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder<E : IInterface!>
Builder for RemoteCallbackList
.
Summary
Nested classes |
abstract |
For notifying when the process hosting a callback interface has died.
|
Public constructors
Public methods
setExecutor
fun setExecutor(executor: Executor): RemoteCallbackList.Builder<IInterface!>
Sets the executor to be used when invoking callbacks asynchronously. This is only used when callbacks need to be invoked asynchronously, e.g. when the process hosting a callback becomes unfrozen. Callbacks that can be invoked immediately run on the same thread that calls broadcast
synchronously.
Parameters |
executor |
Executor: This value cannot be null . Callback and listener events are dispatched through this Executor , providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor() . Otherwise, provide an Executor that dispatches to an appropriate thread. |
setMaxQueueSize
fun setMaxQueueSize(maxQueueSize: Int): RemoteCallbackList.Builder<IInterface!>
Sets the max queue size.
Parameters |
maxQueueSize |
Int: The max size limit on the queue that stores callbacks added when the recipient's process is frozen. Once the limit is reached, the oldest callback is dropped to keep the size under the limit. Should only be called for FROZEN_CALLEE_POLICY_ENQUEUE_ALL . |
Exceptions |
java.lang.IllegalArgumentException |
if the maxQueueSize is not positive. |
java.lang.UnsupportedOperationException |
if frozenCalleePolicy is not FROZEN_CALLEE_POLICY_ENQUEUE_ALL . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-13 UTC."],[],[]]