Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.nio.channels
Class SelectableChannel  view SelectableChannel download SelectableChannel.java

java.lang.Object
  extended byjava.nio.channels.spi.AbstractInterruptibleChannel
      extended byjava.nio.channels.SelectableChannel
All Implemented Interfaces:
Channel, InterruptibleChannel
Direct Known Subclasses:
java.nio.channels.spi.AbstractSelectableChannel

public abstract class SelectableChannel
extends java.nio.channels.spi.AbstractInterruptibleChannel

Since:
1.4

Field Summary
 
Fields inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
 
Constructor Summary
protected SelectableChannel()
          Initializes the channel.
 
Method Summary
abstract  java.lang.Object blockingLock()
          Returns the lock of this channel.
abstract  SelectableChannel configureBlocking(boolean block)
          Adjusts this channel's blocking mode.
abstract  boolean isBlocking()
          Tells whether this channel is blocking or not.
abstract  boolean isRegistered()
          Tells whether or not this channel is currently registered with any selectors.
abstract  SelectionKey keyFor(Selector sel)
          Retrieves the key representing the channel's registration with the given selector.
abstract  java.nio.channels.spi.SelectorProvider provider()
          Returns the provider that created this channel.
 SelectionKey register(Selector sel, int ops)
          Registers this channel with the given selector, returning a selection key.
abstract  SelectionKey register(Selector sel, int ops, java.lang.Object att)
          Registers this channel with the given selector, returning a selection key.
abstract  int validOps()
          Returns a set of valid operations on this channel.
 
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, implCloseChannel, isOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectableChannel

protected SelectableChannel()
Initializes the channel.

Method Detail

blockingLock

public abstract java.lang.Object blockingLock()
Returns the lock of this channel.


configureBlocking

public abstract SelectableChannel configureBlocking(boolean block)
                                             throws java.io.IOException
Adjusts this channel's blocking mode.


isBlocking

public abstract boolean isBlocking()
Tells whether this channel is blocking or not.


isRegistered

public abstract boolean isRegistered()
Tells whether or not this channel is currently registered with any selectors.


keyFor

public abstract SelectionKey keyFor(Selector sel)
Retrieves the key representing the channel's registration with the given selector.


provider

public abstract java.nio.channels.spi.SelectorProvider provider()
Returns the provider that created this channel.


register

public final SelectionKey register(Selector sel,
                                   int ops)
                            throws ClosedChannelException
Registers this channel with the given selector, returning a selection key.


register

public abstract SelectionKey register(Selector sel,
                                      int ops,
                                      java.lang.Object att)
                               throws ClosedChannelException
Registers this channel with the given selector, returning a selection key.


validOps

public abstract int validOps()
Returns a set of valid operations on this channel.