public class DelegatingEventLoop extends Object implements EventLoop
| Modifier and Type | Field and Description |
|---|---|
@NotNull EventLoop |
inner |
DEBUG_ADDING_HANDLERS| Constructor and Description |
|---|
DelegatingEventLoop(@NotNull EventLoop eventLoop)
Constructs a new
DelegatingEventLoop instance that delegates to the specified
EventLoop. |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(EventHandler handler)
Adds a handler to the event loop to be executed.
|
void |
close()
Stops the event loop and then closes any resources being held.
|
boolean |
isAlive()
Checks if the main thread of the event loop is running.
|
boolean |
isClosed()
Checks if this object is closed.
|
boolean |
isClosing()
Checks if this object is in the process of closing.
|
boolean |
isStopped()
Checks if the event loop is in the stopped state.
|
String |
name()
Retrieves the name of the event loop.
|
boolean |
runsInsideCoreLoop()
Checks if the current thread is the core thread of this event loop, or if this information
cannot be determined.
|
void |
start()
Starts the event loop.
|
void |
stop()
Stops executing handlers and blocks until all handlers are complete.
|
void |
unpause()
Typically, implementations will unpause the event loop's pauser, if used.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinEventLoopcloseQuietly, closeQuietly@NotNull public final @NotNull EventLoop inner
public String name()
EventLooppublic void start()
EventLooppublic void unpause()
EventLooppublic void stop()
EventLooppublic boolean isClosed()
QueryCloseableisClosed in interface QueryCloseableclose() method has completed, false otherwisepublic boolean isStopped()
EventLooppublic boolean isClosing()
QueryCloseable
This method should always return true if QueryCloseable.isClosed() returns true.
isClosing in interface QueryCloseableclose() method has been called (but not necessarily completed)public boolean isAlive()
EventLooppublic void close()
EventLoopclose in interface Closeableclose in interface AutoCloseableclose in interface EventLoopAbstractCloseable.performClose()public void addHandler(EventHandler handler)
EventLoopEventLoop.start()
has been called.addHandler in interface EventLoophandler - The handler to be added to the event loop.public boolean runsInsideCoreLoop()
EventLoopfalse.runsInsideCoreLoop in interface EventLooptrue unless the current thread is not the core event thread.Copyright © 2024. All rights reserved.