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 aSslContextHolderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.io.netty.handler.codec.quic.QuicSslContextReturns the value of thequicSslContextObjectrecord component.voidrelease()Release the underlying Netty contexts when no longer needed.voidretain()Retain the underlying Netty contexts for safe reuse.@Nullable io.netty.handler.ssl.SslContextReturns the value of thesslContextrecord component.final StringtoString()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 aSslContextHolderrecord class.- Parameters:
sslContext- the value for thesslContextrecord componentquicSslContextObject- the value for thequicSslContextObjectrecord 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 thesslContextrecord component.- Returns:
- the value of the
sslContextrecord component
-
quicSslContextObject
Returns the value of thequicSslContextObjectrecord component.- Returns:
- the value of the
quicSslContextObjectrecord component
-