Skip to content

Most visited

Recently visited

navigation
Added in API level 1

AbstractSelectionKey

public abstract class AbstractSelectionKey
extends SelectionKey

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


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

Summary

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.

Inherited methods

From class java.nio.channels.SelectionKey
From class java.lang.Object

Protected constructors

AbstractSelectionKey

Added in API level 1
AbstractSelectionKey ()

Constructs a new AbstractSelectionKey.

Public methods

cancel

Added in API level 1
void cancel ()

Cancels this key.

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

isValid

Added in API level 1
boolean isValid ()

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

Returns
boolean true if this key has not been canceled, false otherwise.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.