Home / Class/ ServerUtil Class — netty Architecture

ServerUtil Class — netty Architecture

Architecture documentation for the ServerUtil class in ServerUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  cfd9dc18_ba68_02c9_fd49_9400383b8b9e["ServerUtil"]
  2e6b6e9f_2bea_270a_c806_bd1f4fe58914["ServerUtil.java"]
  cfd9dc18_ba68_02c9_fd49_9400383b8b9e -->|defined in| 2e6b6e9f_2bea_270a_c806_bd1f4fe58914
  11f20b18_3d8d_1f46_2582_e9755f4b6927["ServerUtil()"]
  cfd9dc18_ba68_02c9_fd49_9400383b8b9e -->|method| 11f20b18_3d8d_1f46_2582_e9755f4b6927
  659f64fd_39a9_0a9c_dfe4_0f18be0df31e["SslContext()"]
  cfd9dc18_ba68_02c9_fd49_9400383b8b9e -->|method| 659f64fd_39a9_0a9c_dfe4_0f18be0df31e

Relationship Graph

Source Code

example/src/main/java/io/netty/example/util/ServerUtil.java lines 26–45

public final class ServerUtil {

    private static final boolean SSL = System.getProperty("ssl") != null;

    private ServerUtil() {
    }

    public static SslContext buildSslContext() throws Exception {
        if (!SSL) {
            return null;
        }
        X509Bundle ssc = new CertificateBuilder()
                .subject("cn=localhost")
                .setIsCertificateAuthority(true)
                .buildSelfSigned();
        return SslContextBuilder
                .forServer(ssc.toKeyManagerFactory())
                .build();
    }
}

Frequently Asked Questions

What is the ServerUtil class?
ServerUtil is a class in the netty codebase, defined in example/src/main/java/io/netty/example/util/ServerUtil.java.
Where is ServerUtil defined?
ServerUtil is defined in example/src/main/java/io/netty/example/util/ServerUtil.java at line 26.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free