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 and Description
    `BADKEY` ID 13, bad key
    `BADSIG` ID 12, bad signature
    `BADTIME` ID 14, bad timestamp
    `BADVERS` ID 11, bad extension mechanism for version
    `FORMERROR` ID 1, format error
    `NOERROR` ID 0, no error
    `NOTAUTH` ID 9, not authoritative for zone
    `NOTIMPL` ID 4, not implemented
    `NOTZONE` ID 10, name not in zone
    `NXDOMAIN` ID 3, name error
    `NXRRSET` ID 8, rrset does not exist
    `REFUSED` ID 5, operation refused
    `SERVFAIL` ID 2, server failure
    `YXDOMAIN` ID 6, domain name should not exist
    `YXRRSET` ID 7, resource record set should not exist

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `code()` Returns the error code for this `DnsResponseCode`.
    `String` | `toString()` Returns a formatted error message for this `DnsResponseCode`.
    `static DnsResponseCode` | `valueOf(int responseCode)` Returns the `DnsResponseCode` that corresponds with the given `responseCode`.
    `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.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### 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 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>`

Copyright © 2016. All rights reserved.