public class OnDemandEventLoop extends Object implements EventLoop
DEBUG_ADDING_HANDLERS| Constructor and Description |
|---|
OnDemandEventLoop(Supplier<EventLoop> eventLoopSupplier) |
| 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)
|
void |
close()
Doesn't throw a checked exception.
|
boolean |
hasEventLoop() |
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseQuietly, closeQuietly, notifyClosingisClosing, throwExceptionIfClosedpublic boolean hasEventLoop()
public void addHandler(EventHandler handler)
EventLoopEventLoop.start() has been called.addHandler in interface EventLoophandler - handlerpublic void start()
EventLooppublic void unpause()
EventLooppublic void stop()
EventLooppublic boolean isClosed()
isClosed in interface QueryCloseableisClosed in interface EventLooptrue close has been calledpublic boolean isAlive()
public void awaitTermination()
EventLoopawaitTermination in interface EventLooppublic void close()
Closeableclose in interface Closeableclose in interface AutoCloseableCopyright © 2020. All rights reserved.