Package icyllis.modernui.core
Interface Looper.Observer
- Enclosing class:
Looper
public static interface Looper.Observer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispatchingThrewException
(Object token, Message msg, Exception exception) Called when an exception was thrown while processing a message.void
messageDispatched
(Object token, Message msg) Called when a message was processed by a Handler.Called right before a message is dispatched.
-
Method Details
-
messageDispatchStarting
Object messageDispatchStarting()Called right before a message is dispatched.The token type is not specified to allow the implementation to specify its own type. The token must be passed back exactly once to either
messageDispatched(java.lang.Object, icyllis.modernui.core.Message)
ordispatchingThrewException(java.lang.Object, icyllis.modernui.core.Message, java.lang.Exception)
and must not be reused again.- Returns:
- a token used for collecting telemetry when dispatching a single message.
-
messageDispatched
Called when a message was processed by a Handler.- Parameters:
token
- Token obtained by previously callingmessageDispatchStarting()
on the same Observer instance.msg
- The message that was dispatched.
-
dispatchingThrewException
Called when an exception was thrown while processing a message.- Parameters:
token
- Token obtained by previously callingmessageDispatchStarting()
on the same Observer instance.msg
- The message that was dispatched and caused an exception.exception
- The exception that was thrown.
-