Package io.vertx.core.dns
Enum DnsResponseCode
- java.lang.Object
-
- java.lang.Enum<DnsResponseCode>
-
- io.vertx.core.dns.DnsResponseCode
-
- All Implemented Interfaces:
Serializable,Comparable<DnsResponseCode>
public enum DnsResponseCode extends Enum<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 Constants Enum Constant Description BADKEYID 13, bad keyBADSIGID 12, bad signatureBADTIMEID 14, bad timestampBADVERSID 11, bad extension mechanism for versionFORMERRORID 1, format errorNOERRORID 0, no errorNOTAUTHID 9, not authoritative for zoneNOTIMPLID 4, not implementedNOTZONEID 10, name not in zoneNXDOMAINID 3, name errorNXRRSETID 8, rrset does not existREFUSEDID 5, operation refusedSERVFAILID 2, server failureYXDOMAINID 6, domain name should not existYXRRSETID 7, resource record set should not exist
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcode()Returns the error code for thisDnsResponseCode.StringtoString()Returns a formatted error message for thisDnsResponseCode.static DnsResponseCodevalueOf(int responseCode)Returns theDnsResponseCodethat corresponds with the givenresponseCode.static DnsResponseCodevalueOf(String name)Returns 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 Detail
-
NOERROR
public static final DnsResponseCode NOERROR
ID 0, no error
-
FORMERROR
public static final DnsResponseCode FORMERROR
ID 1, format error
-
SERVFAIL
public static final DnsResponseCode SERVFAIL
ID 2, server failure
-
NXDOMAIN
public static final DnsResponseCode NXDOMAIN
ID 3, name error
-
NOTIMPL
public static final DnsResponseCode NOTIMPL
ID 4, not implemented
-
REFUSED
public static final DnsResponseCode REFUSED
ID 5, operation refused
-
YXDOMAIN
public static final DnsResponseCode YXDOMAIN
ID 6, domain name should not exist
-
YXRRSET
public static final DnsResponseCode YXRRSET
ID 7, resource record set should not exist
-
NXRRSET
public static final DnsResponseCode NXRRSET
ID 8, rrset does not exist
-
NOTAUTH
public static final DnsResponseCode NOTAUTH
ID 9, not authoritative for zone
-
NOTZONE
public static final DnsResponseCode NOTZONE
ID 10, name not in zone
-
BADVERS
public static final DnsResponseCode BADVERS
ID 11, bad extension mechanism for version
-
BADSIG
public static final DnsResponseCode BADSIG
ID 12, bad signature
-
BADKEY
public static final DnsResponseCode BADKEY
ID 13, bad key
-
BADTIME
public static final DnsResponseCode BADTIME
ID 14, bad timestamp
-
-
Method Detail
-
values
public static DnsResponseCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DnsResponseCode c : DnsResponseCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DnsResponseCode valueOf(String name)
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
public static DnsResponseCode valueOf(int responseCode)
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
public String toString()
Returns a formatted error message for thisDnsResponseCode.- Overrides:
toStringin classEnum<DnsResponseCode>
-
-