Enum DnsResponseCode
- All Implemented Interfaces:
Serializable, Comparable<DnsResponseCode>
Represents the possible response codes a server may send after receiving a
query. A response code of 0 indicates no error.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionID 13, bad keyID 12, bad signatureID 14, bad timestampID 11, bad extension mechanism for versionID 1, format errorID 0, no errorID 9, not authoritative for zoneID 4, not implementedID 10, name not in zoneID 3, name errorID 8, rrset does not existID 5, operation refusedID 2, server failureID 6, domain name should not existID 7, resource record set should not exist -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the error code for thisDnsResponseCode.toString()Returns a formatted error message for thisDnsResponseCode.static DnsResponseCodevalueOf(int responseCode) Returns theDnsResponseCodethat corresponds with the givenresponseCode.static DnsResponseCodeReturns the enum constant of this type with the specified name.static DnsResponseCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NOERROR
ID 0, no error -
FORMERROR
ID 1, format error -
SERVFAIL
ID 2, server failure -
NXDOMAIN
ID 3, name error -
NOTIMPL
ID 4, not implemented -
REFUSED
ID 5, operation refused -
YXDOMAIN
ID 6, domain name should not exist -
YXRRSET
ID 7, resource record set should not exist -
NXRRSET
ID 8, rrset does not exist -
NOTAUTH
ID 9, not authoritative for zone -
NOTZONE
ID 10, name not in zone -
BADVERS
ID 11, bad extension mechanism for version -
BADSIG
ID 12, bad signature -
BADKEY
ID 13, bad key -
BADTIME
ID 14, bad timestamp
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
valueOf
Returns theDnsResponseCodethat corresponds with the givenresponseCode.- Parameters:
responseCode- the error code's id- Returns:
- corresponding
DnsResponseCode
-
code
public int code()Returns the error code for thisDnsResponseCode. -
toString
Returns a formatted error message for thisDnsResponseCode.- Overrides:
toStringin classEnum<DnsResponseCode>
-