public static interface Task.Dispatcher
| 限定符和类型 | 方法和说明 |
|---|---|
Task.Dispatcher |
attach(android.os.Handler scheduler)
Attach an existing scheduler to dispatcher, so that we don't need to create an new one.
|
void |
finish(Runnable runnable)
When a task is finished, it will call this method.
|
boolean |
has(int what)
Check if there exists the task with the specific id.
|
boolean |
has(Runnable runnable)
Check if there exists the task with the specific runnable.
|
boolean |
isRunning()
Whether or not the dispatcher is working.
|
void |
post(int what,
Runnable runnable)
Add an task to the dispatcher with id.
|
void |
post(Runnable runnable)
Add an task to the dispatcher.
|
void |
postDelay(int what,
Runnable runnable,
long millis)
Schedule an task to the dispatcher with id.
|
void |
postDelay(Runnable runnable,
long millis)
Schedule an task to the dispatcher.
|
void |
shutdown()
Terminate the dispatcher.
|
void |
start()
Start the dispatcher before it can work.
|
Task.Dispatcher attach(android.os.Handler scheduler)
void start()
boolean isRunning()
void post(Runnable runnable)
void post(int what,
Runnable runnable)
void postDelay(Runnable runnable, long millis)
void postDelay(int what,
Runnable runnable,
long millis)
boolean has(int what)
boolean has(Runnable runnable)
void finish(Runnable runnable)
void shutdown()