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 Details

    • 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 Details

    • values

      public static DnsResponseCode[] 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

      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 name
      NullPointerException - if the argument is null
    • valueOf

      public static DnsResponseCode valueOf(int responseCode)
      Returns the DnsResponseCode that corresponds with the given responseCode.
      Parameters:
      responseCode - the error code's id
      Returns:
      corresponding DnsResponseCode
    • code

      public int code()
      Returns the error code for this DnsResponseCode.
    • toString

      public String toString()
      Returns a formatted error message for this DnsResponseCode.
      Overrides:
      toString in class Enum<DnsResponseCode>