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 close has been called)
|
boolean |
isAlive() |
boolean |
isClosed() |
String |
name() |
void |
start()
Start the event loop
|
void |
stop()
Notify event loop to stop executing handlers.
|
void |
unpause()
Typical implementation will unpause the event loop's Pauser
|
close, closeQuietly, closeQuietly, notifyClosing
isClosing, throwExceptionIfClosed
String name()
void addHandler(EventHandler handler)
start()
has been called.handler
- handlervoid start()
void unpause()
void stop()
boolean isClosed()
isClosed
in interface QueryCloseable
true
close has been calledboolean isAlive()
true
if the main thread is runningvoid awaitTermination()
Copyright © 2020. All rights reserved.