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) |
| 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() |
boolean |
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)
public boolean onRead()
throws java.io.IOException
java.io.IOExceptionpublic static java.nio.ByteBuffer bufferAllocate(int size)
public static java.nio.ByteBuffer bufferAllocateDirect(int size)
public void onClosed()
public boolean onSelect(org.jetlang.fibers.NioFiber nioFiber,
org.jetlang.fibers.NioControls nioControls,
java.nio.channels.SelectionKey selectionKey)
onSelect in interface org.jetlang.fibers.NioChannelHandlerpublic java.nio.channels.SelectableChannel getChannel()
getChannel in interface org.jetlang.fibers.NioChannelHandlerpublic int getInterestSet()
getInterestSet in interface org.jetlang.fibers.NioChannelHandlerpublic void onEnd()
onEnd in interface org.jetlang.fibers.NioChannelHandlerpublic void onSelectorEnd()
onSelectorEnd in interface org.jetlang.fibers.NioChannelHandlerCopyright © 2018. All Rights Reserved.