Package io.netty.handler.codec.dns
Class DnsResponseCode
- java.lang.Object
-
- io.netty.handler.codec.dns.DnsResponseCode
-
- All Implemented Interfaces:
java.lang.Comparable<DnsResponseCode>
public class DnsResponseCode extends java.lang.Object implements java.lang.Comparable<DnsResponseCode>
The DNSRCODE, as defined in RFC2929.
-
-
Field Summary
Fields Modifier and Type Field Description static DnsResponseCodeBADALGThe 'BADALG' DNS RCODE (21), as defined in RFC2930.static DnsResponseCodeBADKEYThe 'BADKEY' DNS RCODE (17), as defined in RFC2845.static DnsResponseCodeBADMODEThe 'BADMODE' DNS RCODE (19), as defined in RFC2930.static DnsResponseCodeBADNAMEThe 'BADNAME' DNS RCODE (20), as defined in RFC2930.static DnsResponseCodeBADTIMEThe 'BADTIME' DNS RCODE (18), as defined in RFC2845.static DnsResponseCodeBADVERS_OR_BADSIGstatic DnsResponseCodeFORMERRThe 'FormErr' DNS RCODE (1), as defined in RFC1035.static DnsResponseCodeNOERRORThe 'NoError' DNS RCODE (0), as defined in RFC1035.static DnsResponseCodeNOTAUTHThe 'NotAuth' DNS RCODE (9), as defined in RFC2136.static DnsResponseCodeNOTIMPThe 'NotImp' DNS RCODE (4), as defined in RFC1035.static DnsResponseCodeNOTZONEThe 'NotZone' DNS RCODE (10), as defined in RFC2136.static DnsResponseCodeNXDOMAINThe 'NXDomain' DNS RCODE (3), as defined in RFC1035.static DnsResponseCodeNXRRSETThe 'NXRRSet' DNS RCODE (8), as defined in RFC2136.static DnsResponseCodeREFUSEDThe 'Refused' DNS RCODE (5), as defined in RFC1035.static DnsResponseCodeSERVFAILThe 'ServFail' DNS RCODE (2), as defined in RFC1035.static DnsResponseCodeYXDOMAINThe 'YXDomain' DNS RCODE (6), as defined in RFC2136.static DnsResponseCodeYXRRSETThe 'YXRRSet' DNS RCODE (7), as defined in RFC2136.
-
Constructor Summary
Constructors Constructor Description DnsResponseCode(int code, java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(DnsResponseCode o)booleanequals(java.lang.Object o)Equality ofDnsResponseCodeonly depends onintValue().inthashCode()intintValue()Returns the error code for thisDnsResponseCode.java.lang.StringtoString()Returns a formatted error message for thisDnsResponseCode.static DnsResponseCodevalueOf(int responseCode)Returns theDnsResponseCodethat corresponds with the givenresponseCode.
-
-
-
Field Detail
-
NOERROR
public static final DnsResponseCode NOERROR
The 'NoError' DNS RCODE (0), as defined in RFC1035.
-
FORMERR
public static final DnsResponseCode FORMERR
The 'FormErr' DNS RCODE (1), as defined in RFC1035.
-
SERVFAIL
public static final DnsResponseCode SERVFAIL
The 'ServFail' DNS RCODE (2), as defined in RFC1035.
-
NXDOMAIN
public static final DnsResponseCode NXDOMAIN
The 'NXDomain' DNS RCODE (3), as defined in RFC1035.
-
NOTIMP
public static final DnsResponseCode NOTIMP
The 'NotImp' DNS RCODE (4), as defined in RFC1035.
-
REFUSED
public static final DnsResponseCode REFUSED
The 'Refused' DNS RCODE (5), as defined in RFC1035.
-
YXDOMAIN
public static final DnsResponseCode YXDOMAIN
The 'YXDomain' DNS RCODE (6), as defined in RFC2136.
-
YXRRSET
public static final DnsResponseCode YXRRSET
The 'YXRRSet' DNS RCODE (7), as defined in RFC2136.
-
NXRRSET
public static final DnsResponseCode NXRRSET
The 'NXRRSet' DNS RCODE (8), as defined in RFC2136.
-
NOTAUTH
public static final DnsResponseCode NOTAUTH
The 'NotAuth' DNS RCODE (9), as defined in RFC2136.
-
NOTZONE
public static final DnsResponseCode NOTZONE
The 'NotZone' DNS RCODE (10), as defined in RFC2136.
-
BADVERS_OR_BADSIG
public static final DnsResponseCode BADVERS_OR_BADSIG
-
BADKEY
public static final DnsResponseCode BADKEY
The 'BADKEY' DNS RCODE (17), as defined in RFC2845.
-
BADTIME
public static final DnsResponseCode BADTIME
The 'BADTIME' DNS RCODE (18), as defined in RFC2845.
-
BADMODE
public static final DnsResponseCode BADMODE
The 'BADMODE' DNS RCODE (19), as defined in RFC2930.
-
BADNAME
public static final DnsResponseCode BADNAME
The 'BADNAME' DNS RCODE (20), as defined in RFC2930.
-
BADALG
public static final DnsResponseCode BADALG
The 'BADALG' DNS RCODE (21), as defined in RFC2930.
-
-
Method Detail
-
valueOf
public static DnsResponseCode valueOf(int responseCode)
Returns theDnsResponseCodethat corresponds with the givenresponseCode.- Parameters:
responseCode- the DNS RCODE- Returns:
- the corresponding
DnsResponseCode
-
intValue
public int intValue()
Returns the error code for thisDnsResponseCode.
-
compareTo
public int compareTo(DnsResponseCode o)
- Specified by:
compareToin interfacejava.lang.Comparable<DnsResponseCode>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
Equality ofDnsResponseCodeonly depends onintValue().- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
Returns a formatted error message for thisDnsResponseCode.- Overrides:
toStringin classjava.lang.Object
-
-