Top Fields Constructors Methods
jnr.enxio.channels

pack-priv Class KQSelectionKey

extends AbstractSelectionKey
Class Inheritance
Imports
java.nio.channels.SelectableChannel, .SelectionKey, .Selector, java.nio.channels.spi.AbstractSelectionKey

Field Summary

Modifier and TypeField and Description
private final NativeSelectableChannel
private int
private int
private final KQSelector

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public SelectableChannel
channel()

Implements abstract java.nio.channels.SelectionKey.channel.

Returns the channel for which this key was created.
pack-priv int
public int
interestOps()

Implements abstract java.nio.channels.SelectionKey.interestOps.

Retrieves this key's interest set.
public SelectionKey
interestOps(int
The new interest set
ops
)

Implements abstract java.nio.channels.SelectionKey.interestOps.

Sets this key's interest set to the given value.
public int
readyOps()

Implements abstract java.nio.channels.SelectionKey.readyOps.

Retrieves this key's ready-operation set.
pack-priv void
readyOps(int readyOps)

public Selector
selector()

Implements abstract java.nio.channels.SelectionKey.selector.

Returns the selector for which this key was created.
Inherited from java.nio.channels.spi.AbstractSelectionKey:
cancelisValid

Field Detail

channelback to summary
private final NativeSelectableChannel channel
interestOpsback to summary
private int interestOps
readyOpsback to summary
private int readyOps
selectorback to summary
private final KQSelector selector

Constructor Detail

KQSelectionKeyback to summary
public KQSelectionKey(KQSelector selector, NativeSelectableChannel channel, int ops)

Method Detail

channelback to summary
public SelectableChannel channel()

Implements abstract java.nio.channels.SelectionKey.channel.

Doc from java.nio.channels.SelectionKey.channel.

Returns the channel for which this key was created. This method will continue to return the channel even after the key is cancelled.

Returns:SelectableChannel

This key's channel

Annotations
@Override
getFDback to summary
pack-priv int getFD()
interestOpsback to summary
public int interestOps()

Implements abstract java.nio.channels.SelectionKey.interestOps.

Doc from java.nio.channels.SelectionKey.interestOps.

Retrieves this key's interest set.

It is guaranteed that the returned set will only contain operation bits that are valid for this key's channel.

Returns:int

This key's interest set

Annotations
@Override
interestOpsback to summary
public SelectionKey interestOps(int ops)

Implements abstract java.nio.channels.SelectionKey.interestOps.

Doc from java.nio.channels.SelectionKey.interestOps.

Sets this key's interest set to the given value.

This method may be invoked at any time. If this method is invoked while a selection operation is in progress then it has no effect upon that operation; the change to the key's interest set will be seen by the next selection operation.

Parameters
ops:int

The new interest set

Returns:SelectionKey

This selection key

Annotations
@Override
readyOpsback to summary
public int readyOps()

Implements abstract java.nio.channels.SelectionKey.readyOps.

Doc from java.nio.channels.SelectionKey.readyOps.

Retrieves this key's ready-operation set.

It is guaranteed that the returned set will only contain operation bits that are valid for this key's channel.

Returns:int

This key's ready-operation set

Annotations
@Override
readyOpsback to summary
pack-priv void readyOps(int readyOps)
selectorback to summary
public Selector selector()

Implements abstract java.nio.channels.SelectionKey.selector.

Doc from java.nio.channels.SelectionKey.selector.

Returns the selector for which this key was created. This method will continue to return the selector even after the key is cancelled.

Returns:Selector

This key's selector

Annotations
@Override