Package io.micronaut.http.netty
Record Class SslContextHolder
java.lang.Object
java.lang.Record
io.micronaut.http.netty.SslContextHolder
- Record Components:
sslContext
- TCP ssl contextquicSslContextObject
- QUIC ssl context. Type Object to avoid native-image issues when the class is missing
@Internal
public record SslContextHolder(@Nullable io.netty.handler.ssl.SslContext sslContext, @Nullable Object quicSslContextObject)
extends Record
Holder for Netty SSL context instances for TCP (
SslContext
) and QUIC/HTTP3
(QuicSslContext
). Manages Netty reference counting via retain()
and
release()
to ensure contexts are safely shared and swapped.- Since:
- 4.10.0
- Author:
- Jonas Konrad
-
Constructor Summary
ConstructorsConstructorDescriptionSslContextHolder
(@Nullable io.netty.handler.ssl.SslContext sslContext, @Nullable Object quicSslContextObject) Creates an instance of aSslContextHolder
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.io.netty.handler.codec.quic.QuicSslContext
Returns the value of thequicSslContextObject
record component.void
release()
Release the underlying Netty contexts when no longer needed.void
retain()
Retain the underlying Netty contexts for safe reuse.@Nullable io.netty.handler.ssl.SslContext
Returns the value of thesslContext
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
SslContextHolder
public SslContextHolder(@Nullable @Nullable io.netty.handler.ssl.SslContext sslContext, @Nullable @Nullable Object quicSslContextObject) Creates an instance of aSslContextHolder
record class.- Parameters:
sslContext
- the value for thesslContext
record componentquicSslContextObject
- the value for thequicSslContextObject
record component
-
-
Method Details
-
retain
public void retain()Retain the underlying Netty contexts for safe reuse. -
release
public void release()Release the underlying Netty contexts when no longer needed. -
quicSslContext
public io.netty.handler.codec.quic.QuicSslContext quicSslContext() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
sslContext
Returns the value of thesslContext
record component.- Returns:
- the value of the
sslContext
record component
-
quicSslContextObject
Returns the value of thequicSslContextObject
record component.- Returns:
- the value of the
quicSslContextObject
record component
-