Quic Class — netty Architecture
Architecture documentation for the Quic class in Quic.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD ce0a1216_6e51_db3d_e439_3e5fed561f60["Quic"] 9afa98df_6c53_63e8_5e12_2459b8f7e833["Quic.java"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|defined in| 9afa98df_6c53_63e8_5e12_2459b8f7e833 8138f996_f03d_ce28_928a_84153f3efc4c["isVersionSupported()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| 8138f996_f03d_ce28_928a_84153f3efc4c 62543994_b9d1_0bb5_1b6e_51dd3b5b7795["isAvailable()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| 62543994_b9d1_0bb5_1b6e_51dd3b5b7795 16edac5b_0cec_3796_2526_5e3f1d87c2da["ensureAvailability()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| 16edac5b_0cec_3796_2526_5e3f1d87c2da e7a6f034_b492_c140_7fce_ae6011420f1e["Throwable()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| e7a6f034_b492_c140_7fce_ae6011420f1e 7f12e5f3_88db_a08b_a793_998ebedeebb5["toOptionsArray()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| 7f12e5f3_88db_a08b_a793_998ebedeebb5 b55a5e25_3978_54a0_c3f3_41a032a05e2e["toAttributesArray()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| b55a5e25_3978_54a0_c3f3_41a032a05e2e 41469d56_2079_0938_2d8e_7c62de372cf7["setAttributes()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| 41469d56_2079_0938_2d8e_7c62de372cf7 4ad5697d_9346_7383_9d43_e454e84d868f["setChannelOptions()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| 4ad5697d_9346_7383_9d43_e454e84d868f 5e9106f1_07bf_91ec_0ef4_48bc893f5829["setChannelOption()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| 5e9106f1_07bf_91ec_0ef4_48bc893f5829 285923ba_da16_a7f5_d066_36fdf7a79cb2["updateOptions()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| 285923ba_da16_a7f5_d066_36fdf7a79cb2 d04f1034_2b5e_d9d3_70a9_97cf66194efe["updateAttributes()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| d04f1034_2b5e_d9d3_70a9_97cf66194efe 634f6a4b_23fe_02bf_8a7b_8b2f9d9246f5["setupChannel()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| 634f6a4b_23fe_02bf_8a7b_8b2f9d9246f5 6d928063_faa4_f4ae_18bd_e708441e1c2d["Quic()"] ce0a1216_6e51_db3d_e439_3e5fed561f60 -->|method| 6d928063_faa4_f4ae_18bd_e708441e1c2d
Relationship Graph
Source Code
codec-classes-quic/src/main/java/io/netty/handler/codec/quic/Quic.java lines 30–175
public final class Quic {
@SuppressWarnings("unchecked")
static final Map.Entry<ChannelOption<?>, Object>[] EMPTY_OPTION_ARRAY = new Map.Entry[0];
@SuppressWarnings("unchecked")
static final Map.Entry<AttributeKey<?>, Object>[] EMPTY_ATTRIBUTE_ARRAY = new Map.Entry[0];
static final int MAX_DATAGRAM_SIZE = 1350;
static final int RESET_TOKEN_LEN = 16;
private static final Throwable UNAVAILABILITY_CAUSE;
static {
Throwable cause = null;
try {
String version = Quiche.quiche_version();
assert version != null;
} catch (Throwable error) {
cause = error;
}
UNAVAILABILITY_CAUSE = cause;
}
/**
* The maximum length of the <a href="https://www.rfc-editor.org/rfc/rfc9000.html#section-17.2">connection id</a>.
*
*/
public static final int MAX_CONN_ID_LEN = 20;
/**
* Return if the given QUIC version is supported.
*
* @param version the version.
* @return {@code true} if supported, {@code false} otherwise.
*/
public static boolean isVersionSupported(int version) {
return isAvailable() && Quiche.quiche_version_is_supported(version);
}
/**
* Returns {@code true} if and only if the QUIC implementation is usable on the running platform is available.
*
* @return {@code true} if this QUIC implementation can be used on the current platform, {@code false} otherwise.
*/
public static boolean isAvailable() {
return UNAVAILABILITY_CAUSE == null;
}
/**
* Ensure that QUIC implementation is usable on the running platform is available.
*
* @throws UnsatisfiedLinkError if unavailable
*/
public static void ensureAvailability() {
if (UNAVAILABILITY_CAUSE != null) {
throw (Error) new UnsatisfiedLinkError(
"failed to load the required native library").initCause(UNAVAILABILITY_CAUSE);
}
}
/**
* Returns the cause of unavailability.
*
* @return the cause if unavailable. {@code null} if available.
*/
@Nullable
public static Throwable unavailabilityCause() {
return UNAVAILABILITY_CAUSE;
}
static Map.Entry<ChannelOption<?>, Object>[] toOptionsArray(Map<ChannelOption<?>, Object> opts) {
return new HashMap<>(opts).entrySet().toArray(EMPTY_OPTION_ARRAY);
}
static Map.Entry<AttributeKey<?>, Object>[] toAttributesArray(Map<AttributeKey<?>, Object> attributes) {
return new LinkedHashMap<>(attributes).entrySet().toArray(EMPTY_ATTRIBUTE_ARRAY);
}
private static void setAttributes(Channel channel, Map.Entry<AttributeKey<?>, Object>[] attrs) {
Source
Frequently Asked Questions
What is the Quic class?
Quic is a class in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/Quic.java.
Where is Quic defined?
Quic is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/Quic.java at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free