java.nio.channels.spi
public abstract class AbstractSelectableChannel extends SelectableChannel
Constructor Summary | |
---|---|
protected | AbstractSelectableChannel(SelectorProvider provider)
Initializes the channel
|
Method Summary | |
---|---|
Object | blockingLock()
Retrieves the object upon which the configureBlocking and register
methods synchronize.
|
SelectableChannel | configureBlocking(boolean blocking)
Adjusts this channel's blocking mode.
|
protected void | implCloseChannel()
Closes this channel.
|
protected abstract void | implCloseSelectableChannel()
Closes this selectable channel.
|
protected abstract void | implConfigureBlocking(boolean blocking)
Adjusts this channel's blocking mode.
|
boolean | isBlocking()
Tells whether or not every I/O operation on this channel will block
until it completes.
|
boolean | isRegistered()
Tells whether or not this channel is currently registered with
any selectors.
|
SelectionKey | keyFor(Selector selector)
Retrieves the key representing the channel's registration with the
given selector.
|
SelectorProvider | provider()
Returns the provider that created this channel.
|
SelectionKey | register(Selector selin, int ops, Object att)
Registers this channel with the given selector, returning a selection key.
|
Parameters: provider the provider that created this channel
Returns: the blocking lock
Parameters: blocking true if blocking should be enabled, false otherwise
Returns: this channel
Throws: IOException If an error occurs
Throws: IOException If an error occurs
Throws: IOException If an error occurs
Parameters: blocking true if blocking should be enabled, false otherwise
Throws: IOException If an error occurs
Returns: true of this channel is blocking, false otherwise
Returns: true if this channel is registered, false otherwise
Parameters: selector the selector to get a selection key for
Returns: the selection key this channel is registered with
Returns: the selector provider that created this channel
Parameters: selin the seletor to use ops the interested operations att an attachment for the returned selection key
Returns: the registered selection key
Throws: ClosedChannelException If the channel is already closed. IllegalBlockingModeException If the channel is configured in blocking mode.