public abstract class BaseNetworkChannel
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ChannelHandler |
channelHandler |
protected Progress |
looper |
protected java.util.Map<java.lang.Integer,java.util.concurrent.BlockingQueue<TCPMessage>> |
pendingReceives |
protected java.util.concurrent.BlockingQueue<TCPMessage> |
pendingSends |
protected int |
readEdge |
protected java.nio.ByteBuffer |
readHeader |
protected TCPMessage |
readingRequest |
protected int |
readMessageSize |
protected DataStatus |
readStatus |
protected SelectHandler |
selectHandler |
protected java.nio.channels.SocketChannel |
socketChannel |
protected java.nio.ByteBuffer |
writeHeader |
protected DataStatus |
writeStatus |
Modifier and Type | Method and Description |
---|---|
boolean |
addReadRequest(TCPMessage request) |
boolean |
addWriteRequest(TCPMessage request) |
void |
clear() |
void |
disableReading() |
void |
disableWriting() |
void |
enableReading() |
void |
enableWriting() |
void |
forceFlush() |
boolean |
isPending() |
void |
read() |
abstract TCPMessage |
readRequest(java.nio.channels.SocketChannel channel) |
void |
write() |
protected java.util.concurrent.BlockingQueue<TCPMessage> pendingSends
protected java.util.Map<java.lang.Integer,java.util.concurrent.BlockingQueue<TCPMessage>> pendingReceives
protected final java.nio.channels.SocketChannel socketChannel
protected Progress looper
protected SelectHandler selectHandler
protected java.nio.ByteBuffer readHeader
protected java.nio.ByteBuffer writeHeader
protected TCPMessage readingRequest
protected int readEdge
protected int readMessageSize
protected DataStatus readStatus
protected DataStatus writeStatus
protected ChannelHandler channelHandler
public void read()
public abstract TCPMessage readRequest(java.nio.channels.SocketChannel channel)
public void clear()
public boolean addReadRequest(TCPMessage request)
public boolean addWriteRequest(TCPMessage request)
public void write()
public void forceFlush()
public boolean isPending()
public void enableReading()
public void disableReading()
public void enableWriting()
public void disableWriting()