public interface EventLoop extends Closeable
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG_ADDING_HANDLERS |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(EventHandler handler)
Add handler to event loop to be executed.
|
void |
awaitTermination()
Wait until the event loop has terminated (after
stop() has been called) |
void |
close()
Stop the event loop, then close any resources being held.
|
static boolean |
inEventLoop() |
boolean |
isAlive() |
boolean |
isStopped() |
String |
name() |
void |
start()
Start the event loop
|
void |
stop()
Stop executing handlers and block until all handlers are complete.
|
void |
unpause()
Typical implementation will unpause the event loop's Pauser
|
closeQuietly, closeQuietlyisClosed, isClosingString name()
void addHandler(EventHandler handler)
start() has been called.handler - handlervoid start()
void unpause()
void stop()
It is not expected that event loops can then be restarted.
boolean isAlive()
true if the main thread is runningboolean isStopped()
void awaitTermination()
stop() has been called)static boolean inEventLoop()
void close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2022. All rights reserved.