Home / Class/ OpenSslSessionId Class — netty Architecture

OpenSslSessionId Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  8dc034c0_8848_64c3_8680_6e09c5f721ef["OpenSslSessionId"]
  56f64c48_af26_d93f_6603_900386a8b540["OpenSslSessionId.java"]
  8dc034c0_8848_64c3_8680_6e09c5f721ef -->|defined in| 56f64c48_af26_d93f_6603_900386a8b540
  c6fc2ae4_515a_041b_7f36_ff173eb586c1["OpenSslSessionId()"]
  8dc034c0_8848_64c3_8680_6e09c5f721ef -->|method| c6fc2ae4_515a_041b_7f36_ff173eb586c1
  24ff765d_aff2_7e66_11fc_b250a5c1a360["equals()"]
  8dc034c0_8848_64c3_8680_6e09c5f721ef -->|method| 24ff765d_aff2_7e66_11fc_b250a5c1a360
  1a1c969b_b02a_ed51_da67_730fbe7662d7["String()"]
  8dc034c0_8848_64c3_8680_6e09c5f721ef -->|method| 1a1c969b_b02a_ed51_da67_730fbe7662d7
  c937f7a4_2493_537d_76e7_cd7087f036d9["hashCode()"]
  8dc034c0_8848_64c3_8680_6e09c5f721ef -->|method| c937f7a4_2493_537d_76e7_cd7087f036d9
  116b0663_43ed_e52d_56e1_6bbe6c5d66e8["cloneBytes()"]
  8dc034c0_8848_64c3_8680_6e09c5f721ef -->|method| 116b0663_43ed_e52d_56e1_6bbe6c5d66e8

Relationship Graph

Source Code

handler/src/main/java/io/netty/handler/ssl/OpenSslSessionId.java lines 25–66

final class OpenSslSessionId {

    private final byte[] id;
    private final int hashCode;

    static final OpenSslSessionId NULL_ID = new OpenSslSessionId(EmptyArrays.EMPTY_BYTES);

    OpenSslSessionId(byte[] id) {
        // We take ownership if the byte[] and so there is no need to clone it.
        this.id = id;
        // cache the hashCode as the byte[] array will never change
        this.hashCode = Arrays.hashCode(id);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof OpenSslSessionId)) {
            return false;
        }

        return Arrays.equals(id, ((OpenSslSessionId) o).id);
    }

    @Override
    public String toString() {
        return "OpenSslSessionId{" +
                "id=" + Arrays.toString(id) +
                '}';
    }

    @Override
    public int hashCode() {
        return hashCode;
    }

    byte[] cloneBytes() {
        return id.clone();
    }
}

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free