|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.thrift.server.TNonblockingServer.FrameBuffer
protected class TNonblockingServer.FrameBuffer
Class that implements a sort of state machine around the interaction with a client and an invoker. It manages reading the frame size and frame data, getting it handed off as wrapped transports, and then the writing of reponse data back to the client. In the process it manages flipping the read and write bits on the selection key for its client.
Field Summary | |
---|---|
TNonblockingTransport |
trans_
|
Constructor Summary | |
---|---|
TNonblockingServer.FrameBuffer(TNonblockingTransport trans,
java.nio.channels.SelectionKey selectionKey)
|
Method Summary | |
---|---|
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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final TNonblockingTransport trans_
Constructor Detail |
---|
public TNonblockingServer.FrameBuffer(TNonblockingTransport trans, java.nio.channels.SelectionKey selectionKey)
Method Detail |
---|
public boolean read()
public boolean write()
public void changeSelectInterests()
public void close()
public boolean isFrameFullyRead()
public void responseReady()
public void invoke()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |