Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public abstract class

AbstractSelectionKey

extends SelectionKey
java.lang.Object
   ↳ java.nio.channels.SelectionKey
     ↳ java.nio.channels.spi.AbstractSelectionKey

Class Overview

AbstractSelectionKey is the base implementation class for selection keys. It implements validation and cancellation methods.

Summary

[Expand]
Inherited Constants
From class java.nio.channels.SelectionKey
Protected Constructors
AbstractSelectionKey ()
Constructs a new AbstractSelectionKey .
Public Methods
final void cancel ()
Cancels this key.
final boolean isValid ()
Indicates whether this key is valid.
[Expand]
Inherited Methods
From class java.nio.channels.SelectionKey
From class java.lang.Object

Protected Constructors

protected AbstractSelectionKey ()

Added in API level 1

Constructs a new AbstractSelectionKey .

Public Methods

public final void cancel ()

Added in API level 1

Cancels this key.

A key that has been canceled is no longer valid. Calling this method on an already canceled key does nothing.

public final boolean isValid ()

Added in API level 1

Indicates whether this key is valid. A key is valid as long as it has not been canceled.

Returns
  • true if this key has not been canceled, false otherwise.