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

public final Enum Http3FrameType

extends Enum<Http3FrameType>
Class Inheritance
Imports
java.util.stream.Stream

An enum to model HTTP/3 frame types.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
Http3FrameType.TYPE

A class to hold type constants

Field Summary

Modifier and TypeField and Description
public static final Http3FrameType
CANCEL_PUSH

Used to identify an HTTP/3 CANCEL_PUSH frame

public static final Http3FrameType
DATA

Used to identify an HTTP/3 DATA frame

public static final Http3FrameType
GOAWAY

Used to identify an HTTP/3 GOAWAY frame

public static final Http3FrameType
HEADERS

Used to identify an HTTP/3 HEADERS frame

public static final Http3FrameType
MAX_PUSH_ID

Used to identify an HTTP/3 MAX_PUSH_ID_FRAME frame

private final long
public static final Http3FrameType
PUSH_PROMISE

Used to identify an HTTP/3 PUSH_PROMISE frame

public static final Http3FrameType
SETTINGS

Used to identify an HTTP/3 SETTINGS frame

private final int
public static final Http3FrameType
UNKNOWN

Used to identify an HTTP/3 frame whose type is unknown

Constructor Summary

AccessConstructor and Description
private
Http3FrameType(int type, long maxLength)

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

a string representation of the given type, suited for inclusion in log messages, exceptions, etc...
asString
(long
an HTTP/3 frame type identifier read from an HTTP/3 frame
type
)

Returns a string representation of the given type, suited for inclusion in log messages, exceptions, etc...

public static Http3FrameType

Returns:

the Http3FrameType corresponding to the given type, or UNKNOWN if no corresponding Http3FrameType instance is found
forType
(long
an HTTP/3 frame type identifier read from an HTTP/3 frame
type
)

Returns the Http3FrameType corresponding to the given type, or UNKNOWN if no corresponding Http3FrameType instance is found.

public int

Returns:

the HTTP/3 frame type, as an int
intType
()

Returns the HTTP/3 frame type, as an int.

public static boolean

Returns:

whether this frame type is illegal
isIllegalType
(long
the frame type
type
)

Returns whether this frame type is illegal.

public static boolean

Returns:

true if the given type matches the 0x21 + 0x1f * N pattern
isReservedType
(long
an HTTP/3 frame type identifier read from an HTTP/3 frame
type
)

Whether the given type is one of the reserved frame types defined by HTTP/3.

public long

Returns:

the maximum length a frame of this type can take
maxLength
()

Returns the maximum length a frame of this type can take.

public long

Returns:

the frame type, as defined by HTTP/3
type
()

Returns the frame type, as defined by HTTP/3.

public static Http3FrameType
public static Http3FrameType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CANCEL_PUSHback to summary
public static final Http3FrameType CANCEL_PUSH

Used to identify an HTTP/3 CANCEL_PUSH frame

DATAback to summary
public static final Http3FrameType DATA

Used to identify an HTTP/3 DATA frame

GOAWAYback to summary
public static final Http3FrameType GOAWAY

Used to identify an HTTP/3 GOAWAY frame

HEADERSback to summary
public static final Http3FrameType HEADERS

Used to identify an HTTP/3 HEADERS frame

MAX_PUSH_IDback to summary
public static final Http3FrameType MAX_PUSH_ID

Used to identify an HTTP/3 MAX_PUSH_ID_FRAME frame

maxLengthback to summary
private final long maxLength
PUSH_PROMISEback to summary
public static final Http3FrameType PUSH_PROMISE

Used to identify an HTTP/3 PUSH_PROMISE frame

SETTINGSback to summary
public static final Http3FrameType SETTINGS

Used to identify an HTTP/3 SETTINGS frame

typeback to summary
private final int type
UNKNOWNback to summary
public static final Http3FrameType UNKNOWN

Used to identify an HTTP/3 frame whose type is unknown

Constructor Detail

Http3FrameTypeback to summary
private Http3FrameType(int type, long maxLength)

Method Detail

asStringback to summary
public static String asString(long type)

Returns a string representation of the given type, suited for inclusion in log messages, exceptions, etc...

Parameters
type:long

an HTTP/3 frame type identifier read from an HTTP/3 frame

Returns:String

a string representation of the given type, suited for inclusion in log messages, exceptions, etc...

forTypeback to summary
public static Http3FrameType forType(long type)

Returns the Http3FrameType corresponding to the given type, or UNKNOWN if no corresponding Http3FrameType instance is found.

Parameters
type:long

an HTTP/3 frame type identifier read from an HTTP/3 frame

Returns:Http3FrameType

the Http3FrameType corresponding to the given type, or UNKNOWN if no corresponding Http3FrameType instance is found

intTypeback to summary
public int intType()

Returns the HTTP/3 frame type, as an int.

API Note

HTTP/3 defines frames type as variable length integers in the range [0, 2^62-1]. However, the few standard frame types registered for HTTP/3 and modeled by this enum class can be coded as an int. This method provides a convenient way to access the frame type as an int, which avoids having to cast when using the value in switch statements.

Returns:int

the HTTP/3 frame type, as an int

isIllegalTypeback to summary
public static boolean isIllegalType(long type)

Returns whether this frame type is illegal. This corresponds to HTTP/2 frame types that have no equivalent in HTTP/3.

Parameters
type:long

the frame type

Returns:boolean

whether this frame type is illegal

isReservedTypeback to summary
public static boolean isReservedType(long type)

Whether the given type is one of the reserved frame types defined by HTTP/3. For any non-negative integer N: 0x21 + 0x1f * N is a reserved frame type that has no meaning.

Parameters
type:long

an HTTP/3 frame type identifier read from an HTTP/3 frame

Returns:boolean

true if the given type matches the 0x21 + 0x1f * N pattern

maxLengthback to summary
public long maxLength()

Returns the maximum length a frame of this type can take.

Returns:long

the maximum length a frame of this type can take

typeback to summary
public long type()

Returns the frame type, as defined by HTTP/3.

Returns:long

the frame type, as defined by HTTP/3

valueOfback to summary
public static Http3FrameType valueOf(String name)
valuesback to summary
public static Http3FrameType[] values()
jdk.internal.net.http.http3.frames back to summary

pack-priv final Class Http3FrameType.TYPE

extends Object
Class Inheritance

A class to hold type constants

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
TYPE()

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CANCEL_PUSH_FRAMEback to summary
public static final int CANCEL_PUSH_FRAME
DATA_FRAMEback to summary
public static final int DATA_FRAME
GOAWAY_FRAMEback to summary
public static final int GOAWAY_FRAME
HEADERS_FRAMEback to summary
public static final int HEADERS_FRAME
MAX_PUSH_ID_FRAMEback to summary
public static final int MAX_PUSH_ID_FRAME
MAX_SETTINGS_LENGTHback to summary
public static final long MAX_SETTINGS_LENGTH
PUSH_PROMISE_FRAMEback to summary
public static final int PUSH_PROMISE_FRAME
SETTINGS_FRAMEback to summary
public static final int SETTINGS_FRAME

Constructor Detail

TYPEback to summary
private TYPE()