HandlerExecutor


@UnstableApi
class HandlerExecutor : Executor


An Executor that posts commands to a Handler or HandlerWrapper and forwards uncaught runtime exceptions to a Listener.

Summary

Nested types

Listener for uncaught exceptions thrown during command execution.

Public constructors

Creates an instance that posts commands to the specified Handler.

HandlerExecutor(
    handler: HandlerWrapper!,
    listener: HandlerExecutor.Listener!
)

Creates an instance that posts commands to the specified HandlerWrapper.

Public functions

Unit
execute(command: Runnable!)

Public constructors

HandlerExecutor

HandlerExecutor(handler: Handler!, listener: HandlerExecutor.Listener!)

Creates an instance that posts commands to the specified Handler.

Parameters
handler: Handler!

The Handler to post commands to.

listener: HandlerExecutor.Listener!

The Listener to notify of uncaught runtime exceptions.

HandlerExecutor

HandlerExecutor(
    handler: HandlerWrapper!,
    listener: HandlerExecutor.Listener!
)

Creates an instance that posts commands to the specified HandlerWrapper.

Parameters
handler: HandlerWrapper!

The HandlerWrapper to post commands to.

listener: HandlerExecutor.Listener!

The Listener to notify of uncaught runtime exceptions.

Public functions

execute

fun execute(command: Runnable!): Unit