Builder Class — netty Architecture
Architecture documentation for the Builder class in SelfSignedCertificate.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 26855d08_f229_22e6_e88d_3599e590a4a2["Builder"] fe09b2ae_3eaa_66f9_4e2d_72d815d788a2["SelfSignedCertificate.java"] 26855d08_f229_22e6_e88d_3599e590a4a2 -->|defined in| fe09b2ae_3eaa_66f9_4e2d_72d815d788a2 fa966a3b_9d52_a911_1232_1a4cc3c15645["Builder()"] 26855d08_f229_22e6_e88d_3599e590a4a2 -->|method| fa966a3b_9d52_a911_1232_1a4cc3c15645 f3c70ee6_d699_9cd6_d6d9_1a56d6984083["SecureRandom()"] 26855d08_f229_22e6_e88d_3599e590a4a2 -->|method| f3c70ee6_d699_9cd6_d6d9_1a56d6984083 b8aa4e6c_99aa_2785_bab6_460c2b940d97["generateKeyPairLocally()"] 26855d08_f229_22e6_e88d_3599e590a4a2 -->|method| b8aa4e6c_99aa_2785_bab6_460c2b940d97 55257261_dd54_ee20_8f66_3fc4c9b91183["addFailure()"] 26855d08_f229_22e6_e88d_3599e590a4a2 -->|method| 55257261_dd54_ee20_8f66_3fc4c9b91183 971b253f_b7f7_89da_da43_0b3d8bc633aa["generateBc()"] 26855d08_f229_22e6_e88d_3599e590a4a2 -->|method| 971b253f_b7f7_89da_da43_0b3d8bc633aa 900c4fb0_eecf_1e0f_575d_cd13e3326164["generateKeytool()"] 26855d08_f229_22e6_e88d_3599e590a4a2 -->|method| 900c4fb0_eecf_1e0f_575d_cd13e3326164 b5363750_f5f1_ca55_285b_e95d7c367441["generateCertificateBuilder()"] 26855d08_f229_22e6_e88d_3599e590a4a2 -->|method| b5363750_f5f1_ca55_285b_e95d7c367441 b14937f1_56d3_8b7e_f9e7_42c9b783b20a["generateSunMiscSecurity()"] 26855d08_f229_22e6_e88d_3599e590a4a2 -->|method| b14937f1_56d3_8b7e_f9e7_42c9b783b20a c0a99f5e_3382_d953_735b_f1aa5498ebd1["SelfSignedCertificate()"] 26855d08_f229_22e6_e88d_3599e590a4a2 -->|method| c0a99f5e_3382_d953_735b_f1aa5498ebd1
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/util/SelfSignedCertificate.java lines 386–591
public static final class Builder {
// user fields
String fqdn = "localhost";
SecureRandom random;
int bits = DEFAULT_KEY_LENGTH_BITS;
Date notBefore = DEFAULT_NOT_BEFORE;
Date notAfter = DEFAULT_NOT_AFTER;
String algorithm = "RSA";
// fields that are populated on demand
Throwable failure;
KeyPair keypair;
PrivateKey privateKey;
String[] paths;
private Builder() {
}
/**
* Set the fully-qualified domain name of the certificate that should be generated.
*
* @param fqdn The FQDN
* @return This builder
*/
public Builder fqdn(String fqdn) {
this.fqdn = ObjectUtil.checkNotNullWithIAE(fqdn, "fqdn");
return this;
}
/**
* Set the RNG to use for key generation. This setting is not supported by the keytool-based generator.
*
* @param random The CSPRNG
* @return This builder
*/
public Builder random(SecureRandom random) {
this.random = random;
return this;
}
/**
* Set the key size.
*
* @param bits The key size
* @return This builder
*/
public Builder bits(int bits) {
this.bits = bits;
return this;
}
/**
* Set the start of the certificate validity period.
*
* @param notBefore The start date
* @return This builder
*/
public Builder notBefore(Date notBefore) {
this.notBefore = ObjectUtil.checkNotNullWithIAE(notBefore, "notBefore");
return this;
}
/**
* Set the end of the certificate validity period.
*
* @param notAfter The start date
* @return This builder
*/
public Builder notAfter(Date notAfter) {
this.notAfter = ObjectUtil.checkNotNullWithIAE(notAfter, "notAfter");
return this;
}
/**
* Set the key algorithm. Only RSA and EC are supported.
*
* @param algorithm The key algorithm
* @return This builder
*/
public Builder algorithm(String algorithm) {
if ("EC".equalsIgnoreCase(algorithm)) {
Source
Frequently Asked Questions
What is the Builder class?
Builder is a class in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/util/SelfSignedCertificate.java.
Where is Builder defined?
Builder is defined in handler/src/main/java/io/netty/handler/ssl/util/SelfSignedCertificate.java at line 386.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free