Top Description Fields Constructors Methods
io.netty5.channel.nio

public final Class NioSelectableChannelHandle<S extends java.nio.channels.SelectableChannel>

extends Object
implements IoHandle
Class Inheritance
All Implemented Interfaces
io.netty5.channel.IoHandle
Imports
io.netty5.channel.IoHandle, io.netty5.util.internal.logging.InternalLogger, .InternalLoggerFactory, java.io.IOException, java.nio.channels.ClosedChannelException, .SelectableChannel, .SelectionKey, .Selector, java.util.function.BiConsumer

Allows to create an IoHandle for a SelectableChannel, not necessarily created by Netty. This IoHandle can be used together with NioHandler and so have events dispatched for the SelectableChannel.

Field Summary

Modifier and TypeField and Description
private final S
private final int
private final BiConsumer<S, SelectionKey>
private static final InternalLogger
private final NioProcessor
private volatile SelectionKey

Constructor Summary

AccessConstructor and Description
public
NioSelectableChannelHandle(S channel, int interestOps, BiConsumer<S, SelectionKey> keyProcessor)

Method Summary

Modifier and TypeMethod and Description
public boolean
isRegistered()

Implements io.netty5.channel.IoHandle.isRegistered.

Return true if registered already.
pack-priv NioProcessor
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

channelback to summary
private final S channel
interestOpsback to summary
private final int interestOps
keyProcessorback to summary
private final BiConsumer<S, SelectionKey> keyProcessor
loggerback to summary
private static final InternalLogger logger
nioProcessorback to summary
private final NioProcessor nioProcessor
selectionKeyback to summary
private volatile SelectionKey selectionKey

Constructor Detail

NioSelectableChannelHandleback to summary
public NioSelectableChannelHandle(S channel, int interestOps, BiConsumer<S, SelectionKey> keyProcessor)

Method Detail

isRegisteredback to summary
public boolean isRegistered()

Implements io.netty5.channel.IoHandle.isRegistered.

Doc from io.netty5.channel.IoHandle.isRegistered.

Return true if registered already.

Returns:boolean

true if registered, false otherwise

Annotations
@Override
nioProcessorback to summary
pack-priv NioProcessor nioProcessor()