Socks5PrivateAuthStatus Class — netty Architecture
Architecture documentation for the Socks5PrivateAuthStatus class in Socks5PrivateAuthStatus.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 24bb398f_5d15_048a_e77e_77587ec6046d["Socks5PrivateAuthStatus"] 2a8a2315_360d_f9ee_4999_39de2b667d39["Socks5PrivateAuthStatus.java"] 24bb398f_5d15_048a_e77e_77587ec6046d -->|defined in| 2a8a2315_360d_f9ee_4999_39de2b667d39 43f8eff7_8efe_1cb6_c340_f84d2f36d70e["Socks5PrivateAuthStatus()"] 24bb398f_5d15_048a_e77e_77587ec6046d -->|method| 43f8eff7_8efe_1cb6_c340_f84d2f36d70e 2b5f9361_5a3b_70c6_4f9e_cb02aa0c7e7b["byteValue()"] 24bb398f_5d15_048a_e77e_77587ec6046d -->|method| 2b5f9361_5a3b_70c6_4f9e_cb02aa0c7e7b bf13cc36_0d8c_32e0_bc85_d7761304675b["isSuccess()"] 24bb398f_5d15_048a_e77e_77587ec6046d -->|method| bf13cc36_0d8c_32e0_bc85_d7761304675b 8368e79c_ab4b_42fe_fe08_5c3aa995b510["hashCode()"] 24bb398f_5d15_048a_e77e_77587ec6046d -->|method| 8368e79c_ab4b_42fe_fe08_5c3aa995b510 89ff5581_030a_516f_f7fc_d483667a3669["equals()"] 24bb398f_5d15_048a_e77e_77587ec6046d -->|method| 89ff5581_030a_516f_f7fc_d483667a3669 6590a7fc_733f_af01_4dd3_5b13276e2ad3["compareTo()"] 24bb398f_5d15_048a_e77e_77587ec6046d -->|method| 6590a7fc_733f_af01_4dd3_5b13276e2ad3 f126d670_ae5d_3fc6_823a_a0d93fb037e1["String()"] 24bb398f_5d15_048a_e77e_77587ec6046d -->|method| f126d670_ae5d_3fc6_823a_a0d93fb037e1
Relationship Graph
Source Code
codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5PrivateAuthStatus.java lines 32–117
public final class Socks5PrivateAuthStatus implements Comparable<Socks5PrivateAuthStatus> {
public static final Socks5PrivateAuthStatus SUCCESS = new Socks5PrivateAuthStatus(0x00, "SUCCESS");
public static final Socks5PrivateAuthStatus FAILURE = new Socks5PrivateAuthStatus(0xFF, "FAILURE");
/**
* Returns the {@link Socks5PrivateAuthStatus} instance that corresponds to the specified byte value.
* <p>
* This method returns a singleton instance for standard status codes:
* <ul>
* <li>0x00: {@link #SUCCESS}</li>
* <li>0xFF: {@link #FAILURE}</li>
* </ul>
* For any other values, a new instance is created.
*
* @param b The byte value of the SOCKS5 private authentication status
* @return The corresponding {@link Socks5PrivateAuthStatus} instance
*/
public static Socks5PrivateAuthStatus valueOf(byte b) {
switch (b) {
case 0x00:
return SUCCESS;
case (byte) 0xFF:
return FAILURE;
}
return new Socks5PrivateAuthStatus(b);
}
private final byte byteValue;
private final String name;
private String text;
private Socks5PrivateAuthStatus(int byteValue) {
this(byteValue, "UNKNOWN");
}
/**
* Creates a new SOCKS5 private authentication status.
*
* @param byteValue The byte value representing the authentication status
* (0x00 for success, 0xFF for failure, or custom values)
* @param name The descriptive name of this status, must not be null
* @throws NullPointerException if the name is null
*/
public Socks5PrivateAuthStatus(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 Socks5PrivateAuthStatus)) {
return false;
}
return byteValue == ((Socks5PrivateAuthStatus) obj).byteValue;
}
@Override
public int compareTo(Socks5PrivateAuthStatus o) {
return byteValue - o.byteValue;
}
@Override
public String toString() {
String text = this.text;
if (text == null) {
Source
Frequently Asked Questions
What is the Socks5PrivateAuthStatus class?
Socks5PrivateAuthStatus is a class in the netty codebase, defined in codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5PrivateAuthStatus.java.
Where is Socks5PrivateAuthStatus defined?
Socks5PrivateAuthStatus is defined in codec-socks/src/main/java/io/netty/handler/codec/socksx/v5/Socks5PrivateAuthStatus.java at line 32.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free