public class AbstractNonblockingServer.FrameBuffer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.nio.ByteBuffer |
buffer_ |
protected ServerContext |
context_ |
protected TMemoryInputTransport |
frameTrans_ |
protected TProtocol |
inProt_ |
protected TTransport |
inTrans_ |
protected TProtocol |
outProt_ |
protected TTransport |
outTrans_ |
protected TByteArrayOutputStream |
response_ |
protected java.nio.channels.SelectionKey |
selectionKey_ |
protected AbstractNonblockingServer.AbstractSelectThread |
selectThread_ |
protected org.apache.thrift.server.AbstractNonblockingServer.FrameBufferState |
state_ |
protected TNonblockingTransport |
trans_ |
Constructor and Description |
---|
AbstractNonblockingServer.FrameBuffer(TNonblockingTransport trans,
java.nio.channels.SelectionKey selectionKey,
AbstractNonblockingServer.AbstractSelectThread selectThread) |
Modifier and Type | Method and Description |
---|---|
void |
changeSelectInterests()
Give this FrameBuffer a chance to set its interest to write, once data
has come in.
|
void |
close()
Shut the connection down.
|
void |
invoke()
Actually invoke the method signified by this FrameBuffer.
|
boolean |
isFrameFullyRead()
Check if this FrameBuffer has a full frame read.
|
boolean |
read()
Give this FrameBuffer a chance to read.
|
protected void |
requestSelectInterestChange()
When this FrameBuffer needs to change its select interests and execution
might not be in its select thread, then this method will make sure the
interest change gets done when the select thread wakes back up.
|
void |
responseReady()
After the processor has processed the invocation, whatever thread is
managing invocations should call this method on this FrameBuffer so we
know it's time to start trying to write again.
|
boolean |
write()
Give this FrameBuffer a chance to write its output to the final client.
|
protected final TNonblockingTransport trans_
protected final java.nio.channels.SelectionKey selectionKey_
protected final AbstractNonblockingServer.AbstractSelectThread selectThread_
protected org.apache.thrift.server.AbstractNonblockingServer.FrameBufferState state_
protected java.nio.ByteBuffer buffer_
protected final TByteArrayOutputStream response_
protected final TMemoryInputTransport frameTrans_
protected final TTransport inTrans_
protected final TTransport outTrans_
protected final TProtocol inProt_
protected final TProtocol outProt_
protected final ServerContext context_
public AbstractNonblockingServer.FrameBuffer(TNonblockingTransport trans, java.nio.channels.SelectionKey selectionKey, AbstractNonblockingServer.AbstractSelectThread selectThread)
public boolean read()
public boolean write()
public void changeSelectInterests()
public void close()
public boolean isFrameFullyRead()
public void responseReady()
public void invoke()
protected void requestSelectInterestChange()