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 DNS
RCODE, as defined in RFC2929.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DnsResponseCodeThe 'BADALG' DNS RCODE (21), as defined in RFC2930.static final DnsResponseCodeThe 'BADKEY' DNS RCODE (17), as defined in RFC2845.static final DnsResponseCodeThe 'BADMODE' DNS RCODE (19), as defined in RFC2930.static final DnsResponseCodeThe 'BADNAME' DNS RCODE (20), as defined in RFC2930.static final DnsResponseCodeThe 'BADTIME' DNS RCODE (18), as defined in RFC2845.static final DnsResponseCodeprivate final intstatic final DnsResponseCodeThe 'FormErr' DNS RCODE (1), as defined in RFC1035.private final java.lang.Stringstatic final DnsResponseCodeThe 'NoError' DNS RCODE (0), as defined in RFC1035.static final DnsResponseCodeThe 'NotAuth' DNS RCODE (9), as defined in RFC2136.static final DnsResponseCodeThe 'NotImp' DNS RCODE (4), as defined in RFC1035.static final DnsResponseCodeThe 'NotZone' DNS RCODE (10), as defined in RFC2136.static final DnsResponseCodeThe 'NXDomain' DNS RCODE (3), as defined in RFC1035.static final DnsResponseCodeThe 'NXRRSet' DNS RCODE (8), as defined in RFC2136.static final DnsResponseCodeThe 'Refused' DNS RCODE (5), as defined in RFC1035.static final DnsResponseCodeThe 'ServFail' DNS RCODE (2), as defined in RFC1035.private java.lang.Stringstatic final DnsResponseCodeThe 'YXDomain' DNS RCODE (6), as defined in RFC2136.static final DnsResponseCodeThe 'YXRRSet' DNS RCODE (7), as defined in RFC2136. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDnsResponseCode(int code) DnsResponseCode(int code, java.lang.String name) -
Method Summary
Modifier and TypeMethodDescriptionintbooleanequals(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.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
NOERROR
The 'NoError' DNS RCODE (0), as defined in RFC1035. -
FORMERR
The 'FormErr' DNS RCODE (1), as defined in RFC1035. -
SERVFAIL
The 'ServFail' DNS RCODE (2), as defined in RFC1035. -
NXDOMAIN
The 'NXDomain' DNS RCODE (3), as defined in RFC1035. -
NOTIMP
The 'NotImp' DNS RCODE (4), as defined in RFC1035. -
REFUSED
The 'Refused' DNS RCODE (5), as defined in RFC1035. -
YXDOMAIN
The 'YXDomain' DNS RCODE (6), as defined in RFC2136. -
YXRRSET
The 'YXRRSet' DNS RCODE (7), as defined in RFC2136. -
NXRRSET
The 'NXRRSet' DNS RCODE (8), as defined in RFC2136. -
NOTAUTH
The 'NotAuth' DNS RCODE (9), as defined in RFC2136. -
NOTZONE
The 'NotZone' DNS RCODE (10), as defined in RFC2136. -
BADVERS_OR_BADSIG
-
BADKEY
The 'BADKEY' DNS RCODE (17), as defined in RFC2845. -
BADTIME
The 'BADTIME' DNS RCODE (18), as defined in RFC2845. -
BADMODE
The 'BADMODE' DNS RCODE (19), as defined in RFC2930. -
BADNAME
The 'BADNAME' DNS RCODE (20), as defined in RFC2930. -
BADALG
The 'BADALG' DNS RCODE (21), as defined in RFC2930. -
code
private final int code -
name
private final java.lang.String name -
text
private java.lang.String text
-
-
Constructor Details
-
DnsResponseCode
private DnsResponseCode(int code) -
DnsResponseCode
public DnsResponseCode(int code, java.lang.String name)
-
-
Method Details
-
valueOf
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
- 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
-