Package org.apache.thrift.transport.sasl
Class SaslNegotiationHeaderReader
- java.lang.Object
-
- org.apache.thrift.transport.sasl.FixedSizeHeaderReader
-
- org.apache.thrift.transport.sasl.SaslNegotiationHeaderReader
-
- All Implemented Interfaces:
FrameHeaderReader
public class SaslNegotiationHeaderReader extends FixedSizeHeaderReader
Header for sasl negotiation frames. It contains status byte of negotiation and a 4-byte integer (payload size).
-
-
Field Summary
Fields Modifier and Type Field Description static intPAYLOAD_LENGTH_BYTESstatic intSTATUS_BYTES-
Fields inherited from class org.apache.thrift.transport.sasl.FixedSizeHeaderReader
byteBuffer
-
-
Constructor Summary
Constructors Constructor Description SaslNegotiationHeaderReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NegotiationStatusgetStatus()protected intheaderSize()protected voidonComplete()Actions (e.g. validation) to carry out when the header is complete.intpayloadSize()As the thrift sasl specification states, all sasl messages (both for negotiatiing and for sending data) should have a header to indicate the size of the payload.-
Methods inherited from class org.apache.thrift.transport.sasl.FixedSizeHeaderReader
clear, isComplete, read, toBytes
-
-
-
-
Field Detail
-
STATUS_BYTES
public static final int STATUS_BYTES
- See Also:
- Constant Field Values
-
PAYLOAD_LENGTH_BYTES
public static final int PAYLOAD_LENGTH_BYTES
- See Also:
- Constant Field Values
-
-
Method Detail
-
headerSize
protected int headerSize()
- Specified by:
headerSizein classFixedSizeHeaderReader- Returns:
- Size of the header.
-
onComplete
protected void onComplete() throws TSaslNegotiationExceptionDescription copied from class:FixedSizeHeaderReaderActions (e.g. validation) to carry out when the header is complete.- Specified by:
onCompletein classFixedSizeHeaderReader- Throws:
TSaslNegotiationException
-
payloadSize
public int payloadSize()
Description copied from interface:FrameHeaderReaderAs the thrift sasl specification states, all sasl messages (both for negotiatiing and for sending data) should have a header to indicate the size of the payload.- Returns:
- size of the payload.
-
getStatus
public NegotiationStatus getStatus()
-
-