Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.nio.channels.spi

Class AbstractSelectableChannel

java.lang.Object
|
+--java.nio.channels.spi.AbstractInterruptibleChannel
   |
   +--java.nio.channels.SelectableChannel
      |
      +--java.nio.channels.spi.AbstractSelectableChannel


public abstract class AbstractSelectableChannel

extends SelectableChannel

Constructor Summary

AbstractSelectableChannel(java.nio.channels.spi.SelectorProvider provider)

Initializes the channel

Method Summary

java.lang.ObjectblockingLock()

Retrieves the object upon which the configureBlocking and register methods synchronize.
java.nio.channels.SelectableChannelconfigureBlocking(boolean block)

Adjusts this channel's blocking mode.
voidimplCloseChannel()

Closes this channel.
voidimplCloseSelectableChannel()

Closes this selectable channel.
voidimplConfigureBlocking(boolean block)

Adjusts this channel's blocking mode.
booleanisBlocking()

Tells whether or not every I/O operation on this channel will block until it completes.
booleanisRegistered()

Tells whether or not this channel is currently registered with any selectors.
java.nio.channels.SelectionKeykeyFor(java.nio.channels.Selector selector)

Retrieves the key representing the channel's registration with the given selector.
java.nio.channels.spi.SelectorProviderprovider()

Returns the provider that created this channel.
java.nio.channels.SelectionKeyregister(java.nio.channels.Selector selin, int ops, java.lang.Object att)

Registers this channel with the given selector, returning a selection key.

Constructor Details

AbstractSelectableChannel

protected AbstractSelectableChannel(java.nio.channels.spi.SelectorProvider provider)

Initializes the channel

Parameters:


Method Details

blockingLock

public final Object blockingLock()

Retrieves the object upon which the configureBlocking and register methods synchronize.


configureBlocking

public final SelectableChannel configureBlocking(boolean block)

Adjusts this channel's blocking mode.

Parameters:


implCloseChannel

protected final void implCloseChannel()

Closes this channel.

Throws:


implCloseSelectableChannel

protected void implCloseSelectableChannel()

Closes this selectable channel.


implConfigureBlocking

protected void implConfigureBlocking(boolean block)

Adjusts this channel's blocking mode.

Parameters:


isBlocking

public final boolean isBlocking()

Tells whether or not every I/O operation on this channel will block until it completes.


isRegistered

public final boolean isRegistered()

Tells whether or not this channel is currently registered with any selectors.


keyFor

public final SelectionKey keyFor(java.nio.channels.Selector selector)

Retrieves the key representing the channel's registration with the given selector.

Parameters:


provider

public final SelectorProvider provider()

Returns the provider that created this channel.


register

public final SelectionKey register(java.nio.channels.Selector selin, int ops, java.lang.Object att)

Registers this channel with the given selector, returning a selection key.

Parameters:

Throws: