public class NioReader<T> extends 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(SocketChannel channel,
org.jetlang.fibers.NioFiber fiber,
org.jetlang.fibers.NioControls controls,
HttpRequestHandler<T> handler,
int readBufferSizeInBytes,
int maxReadLoops,
SessionFactory<T> fact) |
Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
bufferAllocate(int size) |
SelectableChannel |
getChannel() |
int |
getInterestSet() |
void |
onClosed() |
void |
onEnd() |
boolean |
onRead() |
boolean |
onSelect(org.jetlang.fibers.NioFiber nioFiber,
org.jetlang.fibers.NioControls nioControls,
SelectionKey selectionKey) |
void |
onSelectorEnd() |
public static final NioReader.State CLOSE
public NioReader(SocketChannel channel, org.jetlang.fibers.NioFiber fiber, org.jetlang.fibers.NioControls controls, HttpRequestHandler<T> handler, int readBufferSizeInBytes, int maxReadLoops, SessionFactory<T> fact)
public boolean onRead() throws IOException
IOException
public static ByteBuffer bufferAllocate(int size)
public void onClosed()
public boolean onSelect(org.jetlang.fibers.NioFiber nioFiber, org.jetlang.fibers.NioControls nioControls, SelectionKey selectionKey)
onSelect
in interface org.jetlang.fibers.NioChannelHandler
public 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 © 2016. All Rights Reserved.