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 BADKEY
ID 13, bad keyBADSIG
ID 12, bad signatureBADTIME
ID 14, bad timestampBADVERS
ID 11, bad extension mechanism for versionFORMERROR
ID 1, format errorNOERROR
ID 0, no errorNOTAUTH
ID 9, not authoritative for zoneNOTIMPL
ID 4, not implementedNOTZONE
ID 10, name not in zoneNXDOMAIN
ID 3, name errorNXRRSET
ID 8, rrset does not existREFUSED
ID 5, operation refusedSERVFAIL
ID 2, server failureYXDOMAIN
ID 6, domain name should not existYXRRSET
ID 7, resource record set should not exist
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
code()
Returns the error code for thisDnsResponseCode
.String
toString()
Returns a formatted error message for thisDnsResponseCode
.static DnsResponseCode
valueOf(int responseCode)
Returns theDnsResponseCode
that corresponds with the givenresponseCode
.static DnsResponseCode
valueOf(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 theDnsResponseCode
that 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:
toString
in classEnum<DnsResponseCode>
-
-