public abstract class FixedSizeHeaderReader extends java.lang.Object implements FrameHeaderReader
| Modifier and Type | Field and Description |
|---|---|
protected java.nio.ByteBuffer |
byteBuffer |
| Constructor and Description |
|---|
FixedSizeHeaderReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the header and make it available to read a new header.
|
protected abstract int |
headerSize() |
boolean |
isComplete() |
protected abstract void |
onComplete()
Actions (e.g.
|
boolean |
read(TTransport transport)
(Nonblocking) Read fields from underlying transport layer.
|
byte[] |
toBytes() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpayloadSizepublic boolean isComplete()
isComplete in interface FrameHeaderReaderpublic void clear()
FrameHeaderReaderclear in interface FrameHeaderReaderpublic byte[] toBytes()
toBytes in interface FrameHeaderReaderpublic boolean read(TTransport transport) throws TTransportException
FrameHeaderReaderread in interface FrameHeaderReadertransport - underlying transport.TSaslNegotiationException - if fail to read a valid header of a sasl negotiation message.TTransportException - if io error.protected abstract int headerSize()
protected abstract void onComplete()
throws TTransportException
TTransportException