Home / Class/ SslContextOption Class — netty Architecture

SslContextOption Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  c829b145_3f4a_a220_48c0_1f675ef59be3["SslContextOption"]
  90fcd3e7_247a_dee0_b5c3_e5d000a69dfd["SslContextOption.java"]
  c829b145_3f4a_a220_48c0_1f675ef59be3 -->|defined in| 90fcd3e7_247a_dee0_b5c3_e5d000a69dfd
  6e62ef1e_2c59_d8cc_0702_717c0f91c86d["valueOf()"]
  c829b145_3f4a_a220_48c0_1f675ef59be3 -->|method| 6e62ef1e_2c59_d8cc_0702_717c0f91c86d
  31670249_75d9_1ab1_bb18_ba01fc7b87d7["exists()"]
  c829b145_3f4a_a220_48c0_1f675ef59be3 -->|method| 31670249_75d9_1ab1_bb18_ba01fc7b87d7
  a887b5d9_de8b_69fc_ea1d_20b1a979c0c7["SslContextOption()"]
  c829b145_3f4a_a220_48c0_1f675ef59be3 -->|method| a887b5d9_de8b_69fc_ea1d_20b1a979c0c7
  c57e8c19_b112_4a0d_94c0_7d304456aac3["validate()"]
  c829b145_3f4a_a220_48c0_1f675ef59be3 -->|method| c57e8c19_b112_4a0d_94c0_7d304456aac3

Relationship Graph

Source Code

handler/src/main/java/io/netty/handler/ssl/SslContextOption.java lines 31–86

public class SslContextOption<T> extends AbstractConstant<SslContextOption<T>> {

    private static final ConstantPool<SslContextOption<Object>> pool = new ConstantPool<SslContextOption<Object>>() {
        @Override
        protected SslContextOption<Object> newConstant(int id, String name) {
            return new SslContextOption<Object>(id, name);
        }
    };

    /**
     * Returns the {@link SslContextOption} of the specified name.
     */
    @SuppressWarnings("unchecked")
    public static <T> SslContextOption<T> valueOf(String name) {
        return (SslContextOption<T>) pool.valueOf(name);
    }

    /**
     * Shortcut of {@link #valueOf(String) valueOf(firstNameComponent.getName() + "#" + secondNameComponent)}.
     */
    @SuppressWarnings("unchecked")
    public static <T> SslContextOption<T> valueOf(Class<?> firstNameComponent, String secondNameComponent) {
        return (SslContextOption<T>) pool.valueOf(firstNameComponent, secondNameComponent);
    }

    /**
     * Returns {@code true} if a {@link SslContextOption} exists for the given {@code name}.
     */
    public static boolean exists(String name) {
        return pool.exists(name);
    }

    /**
     * Creates a new {@link SslContextOption} with the specified unique {@code name}.
     */
    private SslContextOption(int id, String name) {
        super(id, name);
    }

    /**
     * Should be used by sub-classes.
     *
     * @param name the name of the option
     */
    protected SslContextOption(String name) {
        this(pool.nextId(), name);
    }

    /**
     * Validate the value which is set for the {@link SslContextOption}. Sub-classes
     * may override this for special checks.
     */
    public void validate(T value) {
        ObjectUtil.checkNotNull(value, "value");
    }
}

Frequently Asked Questions

What is the SslContextOption class?
SslContextOption is a class in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SslContextOption.java.
Where is SslContextOption defined?
SslContextOption is defined in handler/src/main/java/io/netty/handler/ssl/SslContextOption.java at line 31.

Analyze Your Own Codebase

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

Try Supermodel Free