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

public final Enum QuicTransportErrors

extends Enum<QuicTransportErrors>
Class Inheritance
Imports
sun.security.ssl.Alert, java.util.Optional, java.util.stream.Stream

An enum to model Quic transport errors. Some errors have a single possible code value, some, like CRYPTO_ERROR have a range of possible values. Usually, the value (a long) would be used instead of the enum, but the enum itself can be useful - for instance in switch statements. This enum models QUIC transport error codes as defined in RFC 9000, section 20.1.

Field Summary

Modifier and TypeField and Description
public static final QuicTransportErrors
AEAD_LIMIT_REACHED

AEAD limit reached error

From RFC 9000, Section 20.1:

An endpoint has reached the confidentiality or integrity limit
for the AEAD algorithm used by the given connection.
public static final QuicTransportErrors
APPLICATION_ERROR

Application error.

public static final QuicTransportErrors
CONNECTION_ID_LIMIT_ERROR

Connection id limit error.

public static final QuicTransportErrors
CONNECTION_REFUSED

Connection refused error.

public static final QuicTransportErrors
CRYPTO_BUFFER_EXCEEDED

Crypto buffer exceeded error.

public static final QuicTransportErrors
CRYPTO_ERROR

Crypto error.

public static final QuicTransportErrors
FINAL_SIZE_ERROR

Final size error.

public static final QuicTransportErrors
FLOW_CONTROL_ERROR

Flow control error.

public static final QuicTransportErrors
FRAME_ENCODING_ERROR

Frame encoding error.

private final long
public static final QuicTransportErrors
INTERNAL_ERROR

Internal Error.

public static final QuicTransportErrors
INVALID_TOKEN

Invalid token error.

public static final QuicTransportErrors
KEY_UPDATE_ERROR

Key update error.

public static final QuicTransportErrors
NO_ERROR

No error.

public static final QuicTransportErrors
NO_VIABLE_PATH

No viable path error.

public static final QuicTransportErrors
PROTOCOL_VIOLATION

Protocol violiation error.

public static final QuicTransportErrors
STREAM_LIMIT_ERROR

Stream limit error.

public static final QuicTransportErrors
STREAM_STATE_ERROR

Stream state error.

private final long
public static final QuicTransportErrors
TRANSPORT_PARAMETER_ERROR

Transport parameter error.

public static final QuicTransportErrors
VERSION_NEGOTIATION_ERROR

Error negotiating version.

Constructor Summary

AccessConstructor and Description
private
private
QuicTransportErrors(long from, long to)

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the code for this transport error, if this error has a single possible code value, -1 otherwise
code
()

Returns the code for this transport error, if this error has a single possible code value, -1 otherwise.

public long

Returns:

the first possible code value in the range, or the code value if this error has a single possible code value
from
()

Returns the first possible code value in the range, or the code value if this error has a single possible code value.

public boolean

Returns:

true if this error has a single possible code value
hasCode
()

Returns true if this error has a single possible code value.

public boolean

Returns:

true if this error has a range of possible code values
hasRange
()

Returns true if this error has a range of possible code values.

pack-priv boolean

Returns:

true if the given code value corresponds to this error.
isFor
(long
an error code value
code
)

Tells whether the given code value corresponds to this error.

public static Optional<QuicTransportErrors>

Returns:

the QuicTransportErrors instance corresponding to the given code value, if any
ofCode
(long
a code value
code
)

Returns the QuicTransportErrors instance corresponding to the given code value, if any.

public long

Returns:

the last possible code value in the range, or the code value if this error has a single possible code value
to
()

Returns the last possible code value in the range, or the code value if this error has a single possible code value.

public static String
toString(long code)

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

Field Detail

AEAD_LIMIT_REACHEDback to summary
public static final QuicTransportErrors AEAD_LIMIT_REACHED

AEAD limit reached error

From RFC 9000, Section 20.1:

An endpoint has reached the confidentiality or integrity limit
for the AEAD algorithm used by the given connection.
APPLICATION_ERRORback to summary
public static final QuicTransportErrors APPLICATION_ERROR

Application error.

From RFC 9000, Section 20.1:

The application or application protocol caused the connection to be closed.
CONNECTION_ID_LIMIT_ERRORback to summary
public static final QuicTransportErrors CONNECTION_ID_LIMIT_ERROR

Connection id limit error.

From RFC 9000, Section 20.1:

The number of connection IDs provided by the peer exceeds
the advertised active_connection_id_limit.
CONNECTION_REFUSEDback to summary
public static final QuicTransportErrors CONNECTION_REFUSED

Connection refused error.

From RFC 9000, Section 20.1:

The server refused to accept a new connection.
CRYPTO_BUFFER_EXCEEDEDback to summary
public static final QuicTransportErrors CRYPTO_BUFFER_EXCEEDED

Crypto buffer exceeded error.

From RFC 9000, Section 20.1:

An endpoint has received more data in CRYPTO frames than it can buffer.
CRYPTO_ERRORback to summary
public static final QuicTransportErrors CRYPTO_ERROR

Crypto error.

From RFC 9000, Section 20.1:

The cryptographic handshake failed. A range of 256 values is
reserved for carrying error codes specific to the cryptographic
handshake that is used. Codes for errors occurring when
TLS is used for the cryptographic handshake are described
in Section 4.8 of [QUIC-TLS].
See Also
Section 4.8 of RFC 9001 [QUIC-TLS]
FINAL_SIZE_ERRORback to summary
public static final QuicTransportErrors FINAL_SIZE_ERROR

Final size error.

From RFC 9000, Section 20.1:

(1) An endpoint received a STREAM frame containing data that exceeded the previously
    established final size,
(2) an endpoint received a STREAM frame or a RESET_STREAM frame containing a final
    size that was lower than the size of stream data that was already received, or
(3) an endpoint received a STREAM frame or a RESET_STREAM frame containing a
    different final size to the one already established.
FLOW_CONTROL_ERRORback to summary
public static final QuicTransportErrors FLOW_CONTROL_ERROR

Flow control error.

From RFC 9000, Section 20.1:

An endpoint received more data than it permitted in its advertised data limits;
see Section 4.
FRAME_ENCODING_ERRORback to summary
public static final QuicTransportErrors FRAME_ENCODING_ERROR

Frame encoding error.

From RFC 9000, Section 20.1:

An endpoint received a frame that was badly formatted -- for instance,
a frame of an unknown type or an ACK frame that has more
acknowledgment ranges than the remainder of the packet could carry.
fromback to summary
private final long from
INTERNAL_ERRORback to summary
public static final QuicTransportErrors INTERNAL_ERROR

Internal Error.

From RFC 9000, Section 20.1:

The endpoint encountered an internal error and cannot
continue with the connection.
INVALID_TOKENback to summary
public static final QuicTransportErrors INVALID_TOKEN

Invalid token error.

From RFC 9000, Section 20.1:

A server received a client Initial that contained an invalid Token field.
KEY_UPDATE_ERRORback to summary
public static final QuicTransportErrors KEY_UPDATE_ERROR

Key update error.

From RFC 9000, Section 20.1:

An endpoint detected errors in performing key updates; see Section 6 of [QUIC-TLS].
See Also
Section 6 of RFC 9001 [QUIC-TLS]
NO_ERRORback to summary
public static final QuicTransportErrors NO_ERROR

No error.

From RFC 9000, Section 20.1:

An endpoint uses this with CONNECTION_CLOSE to signal that
the connection is being closed abruptly in the absence
of any error.
NO_VIABLE_PATHback to summary
public static final QuicTransportErrors NO_VIABLE_PATH

No viable path error.

From RFC 9000, Section 20.1:

An endpoint has determined that the network path is incapable of
supporting QUIC. An endpoint is unlikely to receive a
CONNECTION_CLOSE frame carrying this code except when the
path does not support a large enough MTU.
PROTOCOL_VIOLATIONback to summary
public static final QuicTransportErrors PROTOCOL_VIOLATION

Protocol violiation error.

From RFC 9000, Section 20.1:

An endpoint detected an error with protocol compliance that
was not covered by more specific error codes.
STREAM_LIMIT_ERRORback to summary
public static final QuicTransportErrors STREAM_LIMIT_ERROR

Stream limit error.

From RFC 9000, Section 20.1:

An endpoint received a frame for a stream identifier that exceeded its advertised
stream limit for the corresponding stream type.
STREAM_STATE_ERRORback to summary
public static final QuicTransportErrors STREAM_STATE_ERROR

Stream state error.

From RFC 9000, Section 20.1:

An endpoint received a frame for a stream that was not in a state that permitted
that frame; see Section 3.
See Also
toback to summary
private final long to
TRANSPORT_PARAMETER_ERRORback to summary
public static final QuicTransportErrors TRANSPORT_PARAMETER_ERROR

Transport parameter error.

From RFC 9000, Section 20.1:

An endpoint received transport parameters that were badly
formatted, included an invalid value, omitted a mandatory
transport parameter, included a forbidden transport
parameter, or were otherwise in error.
VERSION_NEGOTIATION_ERRORback to summary
public static final QuicTransportErrors VERSION_NEGOTIATION_ERROR

Error negotiating version.

External Specification
https://www.rfc-editor.org/rfc/rfc9368#name-version-downgrade-preventio

Constructor Detail

QuicTransportErrorsback to summary
private QuicTransportErrors(long code)
QuicTransportErrorsback to summary
private QuicTransportErrors(long from, long to)

Method Detail

codeback to summary
public long code()

Returns the code for this transport error, if this error has a single possible code value, -1 otherwise.

Returns:long

the code for this transport error, if this error has a single possible code value, -1 otherwise

fromback to summary
public long from()

Returns the first possible code value in the range, or the code value if this error has a single possible code value.

Returns:long

the first possible code value in the range, or the code value if this error has a single possible code value

hasCodeback to summary
public boolean hasCode()

Returns true if this error has a single possible code value.

Returns:boolean

true if this error has a single possible code value

hasRangeback to summary
public boolean hasRange()

Returns true if this error has a range of possible code values.

Returns:boolean

true if this error has a range of possible code values

isForback to summary
pack-priv boolean isFor(long code)

Tells whether the given code value corresponds to this error.

Parameters
code:long

an error code value

Returns:boolean

true if the given code value corresponds to this error.

ofCodeback to summary
public static Optional<QuicTransportErrors> ofCode(long code)

Returns the QuicTransportErrors instance corresponding to the given code value, if any.

Parameters
code:long

a code value

Returns:Optional<QuicTransportErrors>

the QuicTransportErrors instance corresponding to the given code value, if any

toback to summary
public long to()

Returns the last possible code value in the range, or the code value if this error has a single possible code value.

Returns:long

the last possible code value in the range, or the code value if this error has a single possible code value

toStringback to summary
public static String toString(long code)
valueOfback to summary
public static QuicTransportErrors valueOf(String name)
valuesback to summary
public static QuicTransportErrors[] values()