Java java.nio.channels SelectionKey fields, constructors, methods, implement or subclass

Example usage for Java java.nio.channels SelectionKey fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.nio.channels SelectionKey.

The text is from its open source code.

Field

intOP_READ
Operation-set bit for read operations.
intOP_WRITE
Operation-set bit for write operations.
intOP_CONNECT
Operation-set bit for socket-connect operations.
intOP_ACCEPT
Operation-set bit for socket-accept operations.
Objectattachment

Method

Objectattach(Object ob)
Attaches the given object to this key.
voidcancel()
Requests that the registration of this key's channel with its selector be cancelled.
SelectableChannelchannel()
Returns the channel for which this key was created.
booleanequals(Object obj)
Indicates whether some other object is "equal to" this one.
SelectionKeyinterestOps(int ops)
Sets this key's interest set to the given value.
intinterestOps()
Retrieves this key's interest set.
booleanisAcceptable()
Tests whether this key's channel is ready to accept a new socket connection.
booleanisConnectable()
Tests whether this key's channel has either finished, or failed to finish, its socket-connection operation.
booleanisReadable()
Tests whether this key's channel is ready for reading.
booleanisValid()
Tells whether or not this key is valid.
booleanisWritable()
Tests whether this key's channel is ready for writing.
intreadyOps()
Retrieves this key's ready-operation set.
Selectorselector()
Returns the selector for which this key was created.