Package org.eclipse.jetty.http3.qpack
Class QpackDecoder
java.lang.Object
org.eclipse.jetty.http3.qpack.QpackDecoder
- All Implemented Interfaces:
Dumpable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionQpackDecoder(Instruction.Handler handler) QpackDecoder(Instruction.Handler handler, int maxHeaderSize) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbooleandecode(long streamId, ByteBuffer buffer, QpackDecoder.Handler handler) Decode a buffer into aMetaDataobject given a HTTP/3 stream ID.voiddump(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.intintintvoidparseInstructions(ByteBuffer buffer) Parse instructions from the Encoder stream.voidsetBeginNanoTimeSupplier(LongSupplier beginNanoTimeSupplier) voidsetMaxBlockedStreams(int maxBlockedStreams) voidsetMaxHeadersSize(int maxHeadersSize) voidsetMaxTableCapacity(int maxTableCapacity) voidstreamCancellation(long streamId) Tells theQpackDecoderthat a particular stream has been cancelled.toString()
-
Constructor Details
-
QpackDecoder
-
QpackDecoder
Deprecated.
-
-
Method Details
-
getMaxHeadersSize
public int getMaxHeadersSize() -
setBeginNanoTimeSupplier
-
setMaxHeadersSize
public void setMaxHeadersSize(int maxHeadersSize) - Parameters:
maxHeadersSize- The maximum allowed size of a headers block, expressed as total of all name and value characters, plus 32 per field
-
getMaxBlockedStreams
public int getMaxBlockedStreams() -
setMaxBlockedStreams
public void setMaxBlockedStreams(int maxBlockedStreams) -
getMaxTableCapacity
public int getMaxTableCapacity() -
setMaxTableCapacity
public void setMaxTableCapacity(int maxTableCapacity) -
decode
public boolean decode(long streamId, ByteBuffer buffer, QpackDecoder.Handler handler) throws QpackException Decode a buffer into a
MetaDataobject given a HTTP/3 stream ID. The buffer must be the complete content of a headers frame and will be fully consumed. It may be that the Dynamic Table does not yet contain the state required to decode this headers frame, in this case the encoded headers will be saved until the required state arrives on the instruction stream to update the dynamic table.This method may generate instructions to be sent back over the Decoder stream to the remote Encoder.
- Parameters:
streamId- the stream ID corresponding to this headers frame.buffer- the content of the headers frame.handler- a handler that is invoked when the MetaData is able to be decoded.- Returns:
- true if the MetaData could be decoded immediately without requiring addition state in the DynamicTable.
- Throws:
QpackException- if there was an error with the QPACK decompression.
-
parseInstructions
Parse instructions from the Encoder stream. The Encoder stream carries an unframed sequence of instructions from the Encoder to the Decoder. This method will fully consume the suppliedByteBufferand produce instructions to update the state of the Decoder and its Dynamic Table.- Parameters:
buffer- a buffer containing bytes from the Encoder stream.- Throws:
QpackException.SessionException- if there was an error parsing or handling the instructions.
-
streamCancellation
public void streamCancellation(long streamId) Tells theQpackDecoderthat a particular stream has been cancelled. Any encoded field sections for this stream will be discarded and a stream cancellation instruction will be sent to the remote Encoder.- Parameters:
streamId- the streamId of the stream that was cancelled.
-
dump
Description copied from interface:DumpableDump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.- Specified by:
dumpin interfaceDumpable- Parameters:
out- The appendable to dump toindent- The indent to apply after any new lines.- Throws:
IOException- if unable to write to Appendable
-
toString
-