Home / Class/ Socks5PasswordAuthStatus Class — netty Architecture

Socks5PasswordAuthStatus Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  714d48f0_ebbb_f72c_a630_da42d5deafe1["Socks5PasswordAuthStatus"]
  e1917e7d_c8be_d796_5a48_a20446b7f8dd["Socks5PasswordAuthStatus.java"]
  714d48f0_ebbb_f72c_a630_da42d5deafe1 -->|defined in| e1917e7d_c8be_d796_5a48_a20446b7f8dd
  85938c4b_cb6c_54e7_0e89_96a390462cec["Socks5PasswordAuthStatus()"]
  714d48f0_ebbb_f72c_a630_da42d5deafe1 -->|method| 85938c4b_cb6c_54e7_0e89_96a390462cec
  16aaa503_e83d_ae84_13dd_403fbc18b779["byteValue()"]
  714d48f0_ebbb_f72c_a630_da42d5deafe1 -->|method| 16aaa503_e83d_ae84_13dd_403fbc18b779
  616efae7_9b09_7aaa_dc37_e5d9e3f1d905["isSuccess()"]
  714d48f0_ebbb_f72c_a630_da42d5deafe1 -->|method| 616efae7_9b09_7aaa_dc37_e5d9e3f1d905
  be90f9de_7b2f_ddd9_2a62_5ea54ac470a1["hashCode()"]
  714d48f0_ebbb_f72c_a630_da42d5deafe1 -->|method| be90f9de_7b2f_ddd9_2a62_5ea54ac470a1
  6b17f21d_d8b2_b2d4_e329_04ab7d513d9f["equals()"]
  714d48f0_ebbb_f72c_a630_da42d5deafe1 -->|method| 6b17f21d_d8b2_b2d4_e329_04ab7d513d9f
  e52c3c75_5015_9a39_94b9_f87cfdb2cbaa["compareTo()"]
  714d48f0_ebbb_f72c_a630_da42d5deafe1 -->|method| e52c3c75_5015_9a39_94b9_f87cfdb2cbaa
  e3b6a0cd_a76b_a265_2dff_7cd17b3b47c1["String()"]
  714d48f0_ebbb_f72c_a630_da42d5deafe1 -->|method| e3b6a0cd_a76b_a265_2dff_7cd17b3b47c1

Relationship Graph

Source Code

codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5PasswordAuthStatus.java lines 24–88

public class Socks5PasswordAuthStatus implements Comparable<Socks5PasswordAuthStatus> {

    public static final Socks5PasswordAuthStatus SUCCESS = new Socks5PasswordAuthStatus(0x00, "SUCCESS");
    public static final Socks5PasswordAuthStatus FAILURE = new Socks5PasswordAuthStatus(0xFF, "FAILURE");

    public static Socks5PasswordAuthStatus valueOf(byte b) {
        switch (b) {
        case 0x00:
            return SUCCESS;
        case (byte) 0xFF:
            return FAILURE;
        }

        return new Socks5PasswordAuthStatus(b);
    }

    private final byte byteValue;
    private final String name;
    private String text;

    public Socks5PasswordAuthStatus(int byteValue) {
        this(byteValue, "UNKNOWN");
    }

    public Socks5PasswordAuthStatus(int byteValue, String name) {
        this.name = ObjectUtil.checkNotNull(name, "name");
        this.byteValue = (byte) byteValue;
    }

    public byte byteValue() {
        return byteValue;
    }

    public boolean isSuccess() {
        return byteValue == 0;
    }

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

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Socks5PasswordAuthStatus)) {
            return false;
        }

        return byteValue == ((Socks5PasswordAuthStatus) obj).byteValue;
    }

    @Override
    public int compareTo(Socks5PasswordAuthStatus o) {
        return byteValue - o.byteValue;
    }

    @Override
    public String toString() {
        String text = this.text;
        if (text == null) {
            this.text = text = name + '(' + (byteValue & 0xFF) + ')';
        }
        return text;
    }
}

Frequently Asked Questions

What is the Socks5PasswordAuthStatus class?
Socks5PasswordAuthStatus is a class in the netty codebase, defined in codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5PasswordAuthStatus.java.
Where is Socks5PasswordAuthStatus defined?
Socks5PasswordAuthStatus is defined in codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5PasswordAuthStatus.java at line 24.

Analyze Your Own Codebase

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

Try Supermodel Free