Callback

An entity that can be multiplexed using a {@link Selector}. <p> Every selectable is associated with exactly one {@link SelectableChannel}. Selectables may be interested in three kinds of events: read events, write events, and timer events. A selectable will express its interest in these events through the {@link #isReading()}, {@link #isWriting()}, and {@link #getDeadline()} methods. <p> When a read, write, or timer event occurs, the selectable must be notified by calling {@link #readable()}, {@link #writeable()}, or {@link #expired()} as appropriate.

Once a selectable reaches a terminal state (see {@link #isTerminal()}, it will never be interested in events of any kind. When this occurs it should be removed from the Selector and discarded using {@link #free()}.

Members

Functions

run
void run(Selectable selectable)
Undocumented in source.

Meta