java.lang.Object | +--java.nio.channels.spi.AbstractInterruptibleChannel | +--java.nio.channels.SelectableChannel
SelectableChannel()Initializes the channel. |
java.lang.Object | blockingLock()Returns the lock of this channel. |
java.nio.channels.SelectableChannel | configureBlocking(boolean block)Adjusts this channel's blocking mode. |
boolean | isBlocking()Tells whether this channel is blocking or not. |
boolean | isRegistered()Tells whether or not this channel is currently registered with any selectors. |
java.nio.channels.SelectionKey | keyFor(java.nio.channels.Selector sel)Retrieves the key representing the channel's registration with the given selector. |
java.nio.channels.spi.SelectorProvider | provider()Returns the provider that created this channel. |
java.nio.channels.SelectionKey | register(java.nio.channels.Selector sel, int ops)Registers this channel with the given selector, returning a selection key. |
java.nio.channels.SelectionKey | register(java.nio.channels.Selector sel, int ops, java.lang.Object att)Registers this channel with the given selector, returning a selection key. |
int | validOps()Returns a set of valid operations on this channel. |
protected SelectableChannel()public Object blockingLock()public SelectableChannel configureBlocking(boolean block)block - ClosedChannelException - If this channel is closed.IllegalBlockingModeException - If block is true and this channel
is registered with one or more selectors.IOException - If an error occurs.public boolean isBlocking()public boolean isRegistered()public SelectionKey keyFor(java.nio.channels.Selector sel)sel - public SelectorProvider provider()public final SelectionKey register(java.nio.channels.Selector sel, int ops)sel - ops - CancelledKeyException - If this channel is currently registered
with the given selector but the corresponding key has already been cancelledClosedChannelException - If this channel is closed.IllegalArgumentException - If a bit in ops does not correspond
to an operation that is supported by this channel, that is, if
set & ~validOps() != 0.IllegalBlockingModeException - If block is true and this channel
is registered with one or more selectors.IllegalSelectorException - If this channel was not created by
the same provider as the given selector.public SelectionKey register(java.nio.channels.Selector sel, int ops, java.lang.Object att)sel - ops - att - CancelledKeyException - If this channel is currently registered
with the given selector but the corresponding key has already been
cancelled.ClosedChannelException - If this channel is closed.IllegalArgumentException - If a bit in ops does not correspond
to an operation that is supported by this channel, that is, if
set & ~validOps() != 0.IllegalBlockingModeException - If block is true and this channel
is registered with one or more selectors.IllegalSelectorException - If this channel was not created by
the same provider as the given selector.public int validOps()