public class MessageQueueThreadImpl extends java.lang.Object implements MessageQueueThread
Looper
running on it that can accept Runnables.Modifier and Type | Method and Description |
---|---|
void |
assertIsOnThread()
|
<T> java.util.concurrent.Future<T> |
callOnQueue(java.util.concurrent.Callable<T> callable)
Runs the given Callable on this Thread.
|
static MessageQueueThreadImpl |
create(MessageQueueThreadSpec spec,
QueueThreadExceptionHandler exceptionHandler) |
android.os.Looper |
getLooper() |
java.lang.String |
getName() |
boolean |
isOnThread() |
void |
quitSynchronous()
Quits this queue's Looper.
|
void |
runOnQueue(java.lang.Runnable runnable)
Runs the given Runnable on this Thread.
|
static MessageQueueThreadImpl |
startNewBackgroundThread(java.lang.String name,
long stackSize,
QueueThreadExceptionHandler exceptionHandler)
Creates and starts a new MessageQueueThreadImpl encapsulating a new Thread with a new Looper
running on it.
|
static MessageQueueThreadImpl |
startNewBackgroundThread(java.lang.String name,
QueueThreadExceptionHandler exceptionHandler) |
public void runOnQueue(java.lang.Runnable runnable)
runOnQueue
in interface MessageQueueThread
public <T> java.util.concurrent.Future<T> callOnQueue(java.util.concurrent.Callable<T> callable)
MessageQueueThread
callOnQueue
in interface MessageQueueThread
public boolean isOnThread()
isOnThread
in interface MessageQueueThread
public void assertIsOnThread()
assertIsOnThread
in interface MessageQueueThread
public void quitSynchronous()
quitSynchronous
in interface MessageQueueThread
public android.os.Looper getLooper()
public java.lang.String getName()
public static MessageQueueThreadImpl create(MessageQueueThreadSpec spec, QueueThreadExceptionHandler exceptionHandler)
public static MessageQueueThreadImpl startNewBackgroundThread(java.lang.String name, QueueThreadExceptionHandler exceptionHandler)
public static MessageQueueThreadImpl startNewBackgroundThread(java.lang.String name, long stackSize, QueueThreadExceptionHandler exceptionHandler)