public class AsyncDispatcher extends Object
AsyncDispatchRunnable tasks but any runnable task may be registered.| Constructor and Description |
|---|
AsyncDispatcher(String name,
ExceptionHandler handler,
int threads)
Creates a new dispatcher.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
alive()
Checks whether the dispatcher is still alive.
|
void |
shutdown()
Shuts down the dispatcher.
|
void |
submit(Runnable r)
Submits a task for execution.
|
void |
wait_clear()
Waits until there are no more tasks to process.
|
public AsyncDispatcher(String name, ExceptionHandler handler, int threads)
name - the dispatcher namehandler - the exception handler; may be null in which
case the default handler will be usedthreads - number of threads to use in the dispatcherpublic boolean alive()
public void shutdown()
public void submit(Runnable r)
r - the task, cannot be nullpublic void wait_clear()
Copyright © 2015. All rights reserved.