AbstractSelectableChannel

public abstract class AbstractSelectableChannel extends SelectableChannel
Known Direct Subclasses

Base implementation class for selectable channels.

This class defines methods that handle the mechanics of channel registration, deregistration, and closing. It maintains the current blocking mode of this channel as well as its current set of selection keys. It performs all of the synchronization required to implement the SelectableChannel specification. Implementations of the abstract protected methods defined in this class need not synchronize against other threads that might be engaged in the same operations.

Protected Constructor Summary

AbstractSelectableChannel(SelectorProvider provider)
Initializes a new instance of this class.

Public Method Summary

final Object
blockingLock()
Retrieves the object upon which the configureBlocking and register methods synchronize.
final SelectableChannel
configureBlocking(boolean block)
Adjusts this channel's blocking mode.
final boolean
isBlocking()
Tells whether or not every I/O operation on this channel will block until it completes.
final boolean
isRegistered()
Tells whether or not this channel is currently registered with any selectors.
final SelectionKey
keyFor(Selector sel)
Retrieves the key representing the channel's registration with the given selector.
final SelectorProvider
provider()
Returns the provider that created this channel.
final SelectionKey
register(Selector sel, int ops, Object att)
Registers this channel with the given selector, returning a selection key.

Protected Method Summary

final void
implCloseChannel()
Closes this channel.
abstract void
implCloseSelectableChannel()
Closes this selectable channel.
abstract void
implConfigureBlocking(boolean block)
Adjusts this channel's blocking mode.

Inherited Method Summary