public interface IOHubReadyListener
SelectableChannel is ready on its registered
SelectionKey.interestOps().IOHub.register(SelectableChannel, IOHubReadyListener, boolean, boolean, boolean, boolean,
IOHubRegistrationCallback),
IOHub.addInterestAccept(SelectionKey),
IOHub.addInterestConnect(SelectionKey),
IOHub.addInterestRead(SelectionKey),
IOHub.addInterestWrite(SelectionKey),
IOHub.removeInterestAccept(SelectionKey),
IOHub.removeInterestConnect(SelectionKey),
IOHub.removeInterestRead(SelectionKey),
IOHub.removeInterestWrite(SelectionKey),
IOHub.unregister(SelectableChannel)| Modifier and Type | Method and Description |
|---|---|
void |
ready(boolean accept,
boolean connect,
boolean read,
boolean write)
Callback to indicate the
SelectableChannel that this listener was registered for is ready for the
indicated operations. |
void ready(boolean accept,
boolean connect,
boolean read,
boolean write)
SelectableChannel that this listener was registered for is ready for the
indicated operations. The SelectionKey.interestOps() will have been cleared for all the operations
that are true so the callback can be assured that processing of any one specific operation will
be linearized, though there may be concurrent calls to ready(boolean, boolean, boolean, boolean) with
disjoint ready operations. The callback will most likely want to re-register for
IOHub.addInterestRead(SelectionKey) or IOHub.addInterestAccept(SelectionKey) immediately before
returning from a ready notification of the read or accept status. The callback will only want to re-register
for a IOHub.addInterestWrite(SelectionKey) if it has filled the SelectableChannel's output
buffer and has more data to write.accept - if the SelectableChannel has a connection to accept. Call
IOHub.addInterestAccept(SelectionKey) to request additional callbacks for this ready
state.connect - if the SelectableChannel has established a connection. Call
IOHub.addInterestConnect(SelectionKey) to request additional callbacks for this ready
state.read - if the SelectableChannel has data available to read. Call
IOHub.addInterestRead(SelectionKey) to request additional callbacks for this ready state.write - if the SelectableChannel can accept data for writing. Call
IOHub.addInterestWrite(SelectionKey) to request additional callbacks for this ready state.Copyright © 2004–2017. All rights reserved.