APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.net.http.http3.frames

public final Class PushPromiseFrame

extends PartialFrame
Class Inheritance
Imports
java.nio.ByteBuffer, jdk.internal.net.http.quic.VariableLengthEncoder

Represents a PUSH_PROMISE HTTP3 frame

Field Summary

Modifier and TypeField and Description
private final long
private final long
public static final int
TYPE

The PUSH_PROMISE frame type, as defined by HTTP/3

Constructor Summary

AccessConstructor and Description
public
PushPromiseFrame(final long pushId, final long fieldLength)

Method Summary

Modifier and TypeMethod and Description
public long
public int

Returns:

the number of bytes needed to write the headers and the promised pushId
headersSize
()

Overrides jdk.internal.net.http.http3.frames.AbstractHttp3Frame.headersSize.

Returns the number of bytes needed to write the headers and the promised pushId.

public long
length()

Implements jdk.internal.net.http.http3.frames.Http3Frame.length.

Returns the length of this frame.

public void
writeHeaders(ByteBuffer
a buffer to write the headers into
buf
)

Overrides jdk.internal.net.http.http3.frames.PartialFrame.writeHeaders.

Write the frame header and the promise pushId to the given buffer.

Inherited from jdk.internal.net.http.http3.frames.PartialFrame:
nextPayloadBytesnextPayloadBytesremainingstreamingLengthtoString

Field Detail

lengthback to summary
private final long length
pushIdback to summary
private final long pushId
TYPEback to summary
public static final int TYPE

The PUSH_PROMISE frame type, as defined by HTTP/3

Constructor Detail

PushPromiseFrameback to summary
public PushPromiseFrame(final long pushId, final long fieldLength)

Method Detail

getPushIdback to summary
public long getPushId()
headersSizeback to summary
public int headersSize()

Overrides jdk.internal.net.http.http3.frames.AbstractHttp3Frame.headersSize.

Returns the number of bytes needed to write the headers and the promised pushId. .

Returns:int

the number of bytes needed to write the headers and the promised pushId

Annotations
@Override
lengthback to summary
public long length()

Implements jdk.internal.net.http.http3.frames.Http3Frame.length.

Doc from jdk.internal.net.http.http3.frames.Http3Frame.length.

Returns the length of this frame.

Annotations
@Override
writeHeadersback to summary
public void writeHeaders(ByteBuffer buf)

Overrides jdk.internal.net.http.http3.frames.PartialFrame.writeHeaders.

Write the frame header and the promise pushId to the given buffer. The caller will be responsible for writing the remaining streamingLength() bytes that constitutes the field section length.

Parameters
buf:ByteBuffer

a buffer to write the headers into

Annotations
@Override