public class NioReader<T>
extends java.lang.Object
implements org.jetlang.fibers.NioChannelHandler
Modifier and Type | Class and Description |
---|---|
static class |
NioReader.Close |
static interface |
NioReader.State |
Modifier and Type | Field and Description |
---|---|
static NioReader.State |
CLOSE |
Constructor and Description |
---|
NioReader(java.nio.channels.SocketChannel channel,
org.jetlang.fibers.NioFiber fiber,
org.jetlang.fibers.NioControls controls,
HttpRequestHandler<T> handler,
int readBufferSizeInBytes,
int maxReadLoops,
SessionFactory<T> fact,
SessionDispatcherFactory<T> dispatcherFact,
IoBufferPool bufferFactory) |
Modifier and Type | Method and Description |
---|---|
static java.nio.ByteBuffer |
bufferAllocate(int size) |
static java.nio.ByteBuffer |
bufferAllocateDirect(int size) |
java.nio.channels.SelectableChannel |
getChannel() |
int |
getInterestSet() |
void |
onClosed() |
void |
onEnd() |
boolean |
onRead() |
org.jetlang.fibers.NioChannelHandler.Result |
onSelect(org.jetlang.fibers.NioFiber nioFiber,
org.jetlang.fibers.NioControls nioControls,
java.nio.channels.SelectionKey selectionKey) |
void |
onSelectorEnd() |
public static final NioReader.State CLOSE
public NioReader(java.nio.channels.SocketChannel channel, org.jetlang.fibers.NioFiber fiber, org.jetlang.fibers.NioControls controls, HttpRequestHandler<T> handler, int readBufferSizeInBytes, int maxReadLoops, SessionFactory<T> fact, SessionDispatcherFactory<T> dispatcherFact, IoBufferPool bufferFactory)
public boolean onRead() throws java.io.IOException
java.io.IOException
public static java.nio.ByteBuffer bufferAllocate(int size)
public static java.nio.ByteBuffer bufferAllocateDirect(int size)
public void onClosed()
public org.jetlang.fibers.NioChannelHandler.Result onSelect(org.jetlang.fibers.NioFiber nioFiber, org.jetlang.fibers.NioControls nioControls, java.nio.channels.SelectionKey selectionKey)
onSelect
in interface org.jetlang.fibers.NioChannelHandler
public java.nio.channels.SelectableChannel getChannel()
getChannel
in interface org.jetlang.fibers.NioChannelHandler
public int getInterestSet()
getInterestSet
in interface org.jetlang.fibers.NioChannelHandler
public void onEnd()
onEnd
in interface org.jetlang.fibers.NioChannelHandler
public void onSelectorEnd()
onSelectorEnd
in interface org.jetlang.fibers.NioChannelHandler
Copyright © 2019. All Rights Reserved.