public class RequestHandlerThread extends HandlerThread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static int |
MSG_POKE_IDLE_HANDLER
Ensure that the MessageQueue's idle handler gets run by poking the message queue;
normally if the message queue is already idle, the idle handler won't get invoked.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
RequestHandlerThread(String name,
Handler.Callback callback) |
Modifier and Type | Method and Description |
---|---|
Handler |
getHandler() |
boolean |
hasAnyMessages(int[] what) |
protected void |
onLooperPrepared()
Call back method that can be explicitly overridden if needed to execute some
setup before Looper loops.
|
void |
removeMessages(int[] what) |
Handler |
waitAndGetHandler() |
void |
waitUntilIdle() |
void |
waitUntilStarted() |
getLooper, getThreadId, quit, quitSafely, run
activeCount, blockedOn, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, parkFor$, parkUntil$, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, unpark$, yield
public static final int MSG_POKE_IDLE_HANDLER
Users of this handler thread should ignore this message.
public RequestHandlerThread(String name, Handler.Callback callback)
protected void onLooperPrepared()
HandlerThread
onLooperPrepared
in class HandlerThread
public void waitUntilStarted()
public Handler getHandler()
public Handler waitAndGetHandler()
public boolean hasAnyMessages(int[] what)
public void removeMessages(int[] what)
public void waitUntilIdle()