APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.net.quic

public final Enum QuicVersion

extends Enum<QuicVersion>
Class Inheritance
Imports
java.util.Collection, .Comparator, .Objects, .Optional

Represents the Quic versions defined in their corresponding RFCs

Field Summary

Modifier and TypeField and Description
public static final QuicVersion
public static final QuicVersion
private final int

Constructor Summary

AccessConstructor and Description
private
QuicVersion(final int versionNumber)

Method Summary

Modifier and TypeMethod and Description
public static QuicVersion

Returns:

the QUIC version to use in the first packet
firstFlightVersion
(final Collection<QuicVersion>
the available QUIC versions
quicVersions
)

From among the quicVersions, selects a QuicVersion to be used in the first packet during connection initiation.

public static Optional<QuicVersion>

Returns:

the QuicVersion corresponding to the versionNumber or an empty Optional if the versionNumber doesn't correspond to a Quic version
of
(int
The version number
versionNumber
)

Returns the QuicVersion corresponding to the versionNumber or an empty Optional if the versionNumber doesn't correspond to a Quic version.

public static QuicVersion
public static QuicVersion[]
public int

Returns:

the version number
versionNumber
()

Returns the version number.

Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

QUIC_V1back to summary
public static final QuicVersion QUIC_V1
QUIC_V2back to summary
public static final QuicVersion QUIC_V2
versionNumberback to summary
private final int versionNumber

Constructor Detail

QuicVersionback to summary
private QuicVersion(final int versionNumber)

Method Detail

firstFlightVersionback to summary
public static QuicVersion firstFlightVersion(final Collection<QuicVersion> quicVersions)

From among the quicVersions, selects a QuicVersion to be used in the first packet during connection initiation.

Parameters
quicVersions:Collection<QuicVersion>

the available QUIC versions

Returns:QuicVersion

the QUIC version to use in the first packet

Exceptions
NullPointerException:
if quicVersions is null or any element in it is null
IllegalArgumentException:
if quicVersions is empty
ofback to summary
public static Optional<QuicVersion> of(int versionNumber)

Returns the QuicVersion corresponding to the versionNumber or an empty Optional if the versionNumber doesn't correspond to a Quic version.

Parameters
versionNumber:int

The version number

Returns:Optional<QuicVersion>

the QuicVersion corresponding to the versionNumber or an empty Optional if the versionNumber doesn't correspond to a Quic version

valueOfback to summary
public static QuicVersion valueOf(String name)
valuesback to summary
public static QuicVersion[] values()
versionNumberback to summary
public int versionNumber()

Returns the version number.

Returns:int

the version number