public class OnDemandEventLoop extends Object implements EventLoop
DEBUG_ADDING_HANDLERS| Constructor and Description |
|---|
OnDemandEventLoop(@NotNull 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
EventLoop.stop() has been called) |
void |
close()
Stop the event loop, then close any resources being held.
|
boolean |
hasEventLoop() |
boolean |
isAlive() |
boolean |
isClosed()
Is this object closed
|
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinEventLoopcloseQuietly, closeQuietlyisClosingpublic 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()
EventLoopIt is not expected that event loops can then be restarted.
public boolean isClosed()
QueryCloseableisClosed in interface QueryCloseablepublic boolean isAlive()
public boolean isStopped()
public void awaitTermination()
EventLoopEventLoop.stop() has been called)awaitTermination in interface EventLooppublic void close()
EventLoopCopyright © 2022. All rights reserved.