QuicConnectionIdGenerator Type — netty Architecture
Architecture documentation for the QuicConnectionIdGenerator type/interface in QuicConnectionIdGenerator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8bdfa30e_c1b3_2c97_b4be_fa90f0b23191["QuicConnectionIdGenerator"] a4e62d14_6739_44c3_b954_169546c374d4["QuicConnectionIdGenerator.java"] 8bdfa30e_c1b3_2c97_b4be_fa90f0b23191 -->|defined in| a4e62d14_6739_44c3_b954_169546c374d4 style 8bdfa30e_c1b3_2c97_b4be_fa90f0b23191 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicConnectionIdGenerator.java lines 23–90
public interface QuicConnectionIdGenerator {
/**
* Creates a new connection id with the given length. This method may not be supported by
* a sign id generator implementation as a sign id generator should always have an input
* to sign with, otherwise this method may generate the same id which may cause some
* unpredictable issues when we use it.
*
* @param length the length of the id.
* @return the id.
*/
ByteBuffer newId(int length);
/**
* Creates a new connection id with the given length. The given input may be used to sign or
* seed the id, or may be ignored (depending on the implementation).
*
* @param input the input which may be used to generate the id.
* @param length the length of the id.
* @return the id.
*/
ByteBuffer newId(ByteBuffer input, int length);
/**
* Creates a new connection id with the given length. The given source connection id and destionation connection id
* may be used to sign or seed the id, or may be ignored (depending on the implementation).
*
* @param scid the source connection id which may be used to generate the id.
* @param dcid the destination connection id which may be used to generate the id.
* @param length the length of the id.
* @return the id.
*/
default ByteBuffer newId(ByteBuffer scid, ByteBuffer dcid, int length) {
return newId(dcid, length);
}
/**
* Returns the maximum length of a connection id.
*
* @return the maximum length of a connection id that is supported.
*/
int maxConnectionIdLength();
/**
* Returns true if the implementation is idempotent, which means we will get the same id
* with the same input ByteBuffer. Otherwise, returns false.
*
* @return whether the implementation is idempotent.
*/
boolean isIdempotent();
/**
* Return a {@link QuicConnectionIdGenerator} which randomly generates new connection ids.
*
* @return a {@link QuicConnectionIdGenerator} which randomly generated ids.
*/
static QuicConnectionIdGenerator randomGenerator() {
return SecureRandomQuicConnectionIdGenerator.INSTANCE;
}
/**
* Return a {@link QuicConnectionIdGenerator} which generates new connection ids by signing the given input.
*
* @return a {@link QuicConnectionIdGenerator} which generates ids by signing the given input.
*/
static QuicConnectionIdGenerator signGenerator() {
return HmacSignQuicConnectionIdGenerator.INSTANCE;
}
}
Defined In
Source
Frequently Asked Questions
What is the QuicConnectionIdGenerator type?
QuicConnectionIdGenerator is a type/interface in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicConnectionIdGenerator.java.
Where is QuicConnectionIdGenerator defined?
QuicConnectionIdGenerator is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicConnectionIdGenerator.java at line 23.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free