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

public final Class QuicTransportException

extends Exception
Class Inheritance

Exception that wraps QUIC transport error codes. Thrown in response to packets or frames that violate QUIC protocol. This is a fatal exception; connection is always closed when this exception is caught.

For a list of errors see: https://www.rfc-editor.org/rfc/rfc9000.html#name-transport-error-codes

Field Summary

Modifier and TypeField and Description
private final long
private final long
private final QuicTLSEngine.KeySpace
private static final long

Constructor Summary

AccessConstructor and Description
public
QuicTransportException(String
the reason why the exception occurred
reason
,
QuicTLSEngine.KeySpace
the key space in which the frame appeared. May be null, for instance, in case of QuicTransportErrors#INTERNAL_ERROR.
keySpace
,
long
the frame type of the frame whose parsing / handling caused the error. May be 0 if not related to any specific frame.
frameType
,
QuicTransportErrors
a quic transport error
errorCode
)

Constructs a new QuicTransportException.

public
QuicTransportException(String
the reason why the exception occurred
reason
,
QuicTLSEngine.KeySpace
the key space in which the frame appeared. May be null, for instance, in case of QuicTransportErrors#INTERNAL_ERROR.
keySpace
,
long
the frame type of the frame whose parsing / handling caused the error. May be 0 if not related to any specific frame.
frameType
,
long
a quic transport error code
errorCode
,
Throwable
the cause
cause
)

Constructs a new QuicTransportException.

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the transport error that occurred
getErrorCode
()

Returns the transport error that occurred.

public long

Returns:

the frame type for which the error occurred, or 0
getFrameType
()

Returns the frame type for which the error occurred, or 0.

public QuicTLSEngine.KeySpace

Returns:

the key space for which the error occurred, or null
getKeySpace
()

Returns the key space for which the error occurred, or null.

public String

Returns:

the reason to include in the ConnectionCloseFrame
getReason
()

Returns the reason to include in the ConnectionCloseFrame.

Field Detail

errorCodeback to summary
private final long errorCode
frameTypeback to summary
private final long frameType
keySpaceback to summary
private final QuicTLSEngine.KeySpace keySpace
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Annotations
@Serial

Constructor Detail

QuicTransportExceptionback to summary
public QuicTransportException(String reason, QuicTLSEngine.KeySpace keySpace, long frameType, QuicTransportErrors errorCode)

Constructs a new QuicTransportException.

Parameters
reason:String

the reason why the exception occurred

keySpace:QuicTLSEngine.KeySpace

the key space in which the frame appeared. May be null, for instance, in case of QuicTransportErrors#INTERNAL_ERROR.

frameType:long

the frame type of the frame whose parsing / handling caused the error. May be 0 if not related to any specific frame.

errorCode:QuicTransportErrors

a quic transport error

QuicTransportExceptionback to summary
public QuicTransportException(String reason, QuicTLSEngine.KeySpace keySpace, long frameType, long errorCode, Throwable cause)

Constructs a new QuicTransportException. For use with TLS alerts.

Parameters
reason:String

the reason why the exception occurred

keySpace:QuicTLSEngine.KeySpace

the key space in which the frame appeared. May be null, for instance, in case of QuicTransportErrors#INTERNAL_ERROR.

frameType:long

the frame type of the frame whose parsing / handling caused the error. May be 0 if not related to any specific frame.

errorCode:long

a quic transport error code

cause:Throwable

the cause

Method Detail

getErrorCodeback to summary
public long getErrorCode()

Returns the transport error that occurred.

Returns:long

the transport error that occurred

getFrameTypeback to summary
public long getFrameType()

Returns the frame type for which the error occurred, or 0.

Returns:long

the frame type for which the error occurred, or 0

getKeySpaceback to summary
public QuicTLSEngine.KeySpace getKeySpace()

Returns the key space for which the error occurred, or null.

Returns:QuicTLSEngine.KeySpace

the key space for which the error occurred, or null

getReasonback to summary
public String getReason()

Returns the reason to include in the ConnectionCloseFrame.

Returns:String

the reason to include in the ConnectionCloseFrame