public final class GlobalDispatcher extends Object
AsyncDispatcher
.Modifier and Type | Method and Description |
---|---|
static void |
init(AsyncDispatcher dispatcher)
Sets the given dispatcher as the global dispatcher.
|
static AsyncDispatcher |
instance()
Initializes and obtains the global instance.
|
static void |
shutdown()
Shuts down the global instance, if one is running.
|
static void |
submit(Runnable r)
Submits a task for execution.
|
static void |
wait_clear()
Quick access for invoking
AsyncDispatcher.wait_clear() in
instance() . |
public static AsyncDispatcher instance()
public static void shutdown()
public static void init(AsyncDispatcher dispatcher)
dispatcher
- the dispatcher to set, cannot be null
public static void submit(Runnable r)
AsyncDispatcher.submit(Runnable)
from the dispatcher obtained
from instance()
r
- the task, cannot be null
public static void wait_clear()
AsyncDispatcher.wait_clear()
in
instance()
.Copyright © 2015. All rights reserved.