Class Socks5PrivateAuthStatus
java.lang.Object
io.netty.handler.codec.socksx.v5.Socks5PrivateAuthStatus
- All Implemented Interfaces:
Comparable<Socks5PrivateAuthStatus>
public final class Socks5PrivateAuthStatus
extends Object
implements Comparable<Socks5PrivateAuthStatus>
The status of a SOCKS5 private authentication response.
RFC 1928 reserves method codes 0x80-0xFE for private authentication methods but does not specify the format of their subnegotiation. This class provides standard status codes for the private authentication response that follow the pattern established by the username/password authentication method in RFC 1929.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Socks5PrivateAuthStatusstatic final Socks5PrivateAuthStatus -
Constructor Summary
ConstructorsConstructorDescriptionSocks5PrivateAuthStatus(int byteValue, String name) Creates a new SOCKS5 private authentication status. -
Method Summary
Modifier and TypeMethodDescriptionbyteintbooleaninthashCode()booleantoString()static Socks5PrivateAuthStatusvalueOf(byte b) Returns theSocks5PrivateAuthStatusinstance that corresponds to the specified byte value.
-
Field Details
-
SUCCESS
-
FAILURE
-
-
Constructor Details
-
Socks5PrivateAuthStatus
Creates a new SOCKS5 private authentication status.- Parameters:
byteValue- The byte value representing the authentication status (0x00 for success, 0xFF for failure, or custom values)name- The descriptive name of this status, must not be null- Throws:
NullPointerException- if the name is null
-
-
Method Details
-
valueOf
Returns theSocks5PrivateAuthStatusinstance that corresponds to the specified byte value.This method returns a singleton instance for standard status codes:
For any other values, a new instance is created.- Parameters:
b- The byte value of the SOCKS5 private authentication status- Returns:
- The corresponding
Socks5PrivateAuthStatusinstance
-
byteValue
public byte byteValue() -
isSuccess
public boolean isSuccess() -
hashCode
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<Socks5PrivateAuthStatus>
-
toString
-