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

public final Class QuicTLSContext

extends Object
Class Inheritance
Imports
java.lang.invoke.MethodHandles, .VarHandle, java.util.Arrays, .Objects, javax.net.ssl.SSLContext, .SSLContextSpi, .SSLParameters, sun.security.ssl.QuicTLSEngineImpl, .SSLContextImpl

Instances of this class act as a factory for creation of QUIC TLS engine.

Field Summary

Modifier and TypeField and Description
private static final VarHandle
private final SSLContextImpl

Constructor Summary

AccessConstructor and Description
public
QuicTLSContext(final SSLContext
The SSLContext
sslContext
)

Constructs a QuicTLSContext for the given sslContext

Method Summary

Modifier and TypeMethod and Description
public QuicTLSEngine

Returns:

the newly created QuicTLSEngine
createEngine
()

Creates a QuicTLSEngine using this context

This method does not provide hints for session caching.

public QuicTLSEngine

Returns:

the newly created QuicTLSEngine
createEngine
(final String
The peer hostname or IP address. Can be null.
peerHost
,
final int
The peer port, can be -1 if the port is unknown
peerPort
)

Creates a QuicTLSEngine using this context using advisory peer information.

private static SSLContextImpl
getSSLContextImpl(final SSLContext sslContext)

public static boolean

Returns:

true if the given sslContext supports QUIC TLS, false otherwise
isQuicCompatible
(final SSLContext sslContext)

Returns true if the given sslContext supports QUIC TLS, false otherwise.

private static boolean

Returns:

true if protocols of the given parameters support QUIC TLS, false otherwise
isQuicCompatible
(SSLParameters parameters)

Returns true if protocols of the given parameters support QUIC TLS, false otherwise.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONTEXT_SPIback to summary
private static final VarHandle CONTEXT_SPI
sslCtxImplback to summary
private final SSLContextImpl sslCtxImpl

Constructor Detail

QuicTLSContextback to summary
public QuicTLSContext(final SSLContext sslContext)

Constructs a QuicTLSContext for the given sslContext

Parameters
sslContext:SSLContext

The SSLContext

Exceptions
IllegalArgumentException:
If the passed sslContext isn't supported by the QuicTLSContext
See Also
isQuicCompatible(SSLContext)

Method Detail

createEngineback to summary
public QuicTLSEngine createEngine()

Creates a QuicTLSEngine using this context

This method does not provide hints for session caching.

Returns:QuicTLSEngine

the newly created QuicTLSEngine

createEngineback to summary
public QuicTLSEngine createEngine(final String peerHost, final int peerPort)

Creates a QuicTLSEngine using this context using advisory peer information.

The provided parameters will be used as hints for session caching. The peerHost parameter will be used in the server_name extension, unless overridden later.

Parameters
peerHost:String

The peer hostname or IP address. Can be null.

peerPort:int

The peer port, can be -1 if the port is unknown

Returns:QuicTLSEngine

the newly created QuicTLSEngine

getSSLContextImplback to summary
private static SSLContextImpl getSSLContextImpl(final SSLContext sslContext)
isQuicCompatibleback to summary
public static boolean isQuicCompatible(final SSLContext sslContext)

Returns true if the given sslContext supports QUIC TLS, false otherwise.

Parameters
sslContext:SSLContext

an SSLContext

Returns:boolean

true if the given sslContext supports QUIC TLS, false otherwise

isQuicCompatibleback to summary
private static boolean isQuicCompatible(SSLParameters parameters)

Returns true if protocols of the given parameters support QUIC TLS, false otherwise.

Returns:boolean

true if protocols of the given parameters support QUIC TLS, false otherwise