Package io.vertx.core.dns

## Class DnsClientOptions

- java.lang.Object
- - io.vertx.core.dns.DnsClientOptions

-     public class DnsClientOptions
      extends Object

  Configuration options for Vert.x DNS client.
  Author:
    Julien Viet

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `DEFAULT_HOST` | The default value for the host = `null` (configured by `VertxOptions.getAddressResolverOptions()`)
    `static ByteBufFormat` | `DEFAULT_LOG_ACTIVITY_FORMAT` | The default ByteBufFormat is SIMPLE
    `static boolean` | `DEFAULT_LOG_ENABLED` | The default log enabled = false
    `static int` | `DEFAULT_PORT` | The default value for the port = `-1` (configured by `VertxOptions.getAddressResolverOptions()`)
    `static long` | `DEFAULT_QUERY_TIMEOUT` | The default value for the query timeout in millis = `5000`
    `static boolean` | `DEFAULT_RECURSION_DESIRED` | The default value for the recursion desired flag (RD) = `true`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DnsClientOptions()` |
    `DnsClientOptions​(DnsClientOptions other)` |
    `DnsClientOptions​(JsonObject json)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ByteBufFormat` | `getActivityLogFormat()` |
    `String` | `getHost()` | Get the host name to be used by this client in requests.
    `boolean` | `getLogActivity()` |
    `int` | `getPort()` | Get the port to be used by this client in requests.
    `long` | `getQueryTimeout()` |
    `boolean` | `isRecursionDesired()` | Return whether or not recursion is desired
    `DnsClientOptions` | `setActivityLogFormat​(ByteBufFormat activityLogFormat)` | Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger.
    `DnsClientOptions` | `setHost​(String host)` | Set the host name to be used by this client in requests.
    `DnsClientOptions` | `setLogActivity​(boolean logActivity)` | Set to true to enable network activity logging: Netty's pipeline is configured for logging on Netty's logger.
    `DnsClientOptions` | `setPort​(int port)` | Set the port to be used by this client in requests.
    `DnsClientOptions` | `setQueryTimeout​(long queryTimeout)` | Set the query timeout in milliseconds, i.e the amount of time after a query is considered to be failed.
    `DnsClientOptions` | `setRecursionDesired​(boolean recursionDesired)` | Set whether or not recursion is desired
    `JsonObject` | `toJson()` |

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_PORT

          public static final int DEFAULT_PORT

      The default value for the port = `-1` (configured by `VertxOptions.getAddressResolverOptions()`)
      See Also:
        Constant Field Values

    - #### DEFAULT_HOST

          public static final String DEFAULT_HOST

      The default value for the host = `null` (configured by `VertxOptions.getAddressResolverOptions()`)

    - #### DEFAULT_QUERY_TIMEOUT

          public static final long DEFAULT_QUERY_TIMEOUT

      The default value for the query timeout in millis = `5000`
      See Also:
        Constant Field Values

    - #### DEFAULT_LOG_ENABLED

          public static final boolean DEFAULT_LOG_ENABLED

      The default log enabled = false
      See Also:
        Constant Field Values

    - #### DEFAULT_LOG_ACTIVITY_FORMAT

          public static final ByteBufFormat DEFAULT_LOG_ACTIVITY_FORMAT

      The default ByteBufFormat is SIMPLE

    - #### DEFAULT_RECURSION_DESIRED

          public static final boolean DEFAULT_RECURSION_DESIRED

      The default value for the recursion desired flag (RD) = `true`
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DnsClientOptions

          public DnsClientOptions()

    - #### DnsClientOptions

          public DnsClientOptions​(JsonObject json)

    - #### DnsClientOptions

          public DnsClientOptions​(DnsClientOptions other)

  - ### Method Detail

    - #### getPort

          public int getPort()

      Get the port to be used by this client in requests.
      Returns:
        the port

    - #### setPort

          public DnsClientOptions setPort​(int port)

      Set the port to be used by this client in requests.
      Returns:
        a reference to this, so the API can be used fluently

    - #### getHost

          public String getHost()

      Get the host name to be used by this client in requests.
      Returns:
        the host name

    - #### setHost

          public DnsClientOptions setHost​(String host)

      Set the host name to be used by this client in requests.
      Returns:
        a reference to this, so the API can be used fluently

    - #### getQueryTimeout

          public long getQueryTimeout()

      Returns:
        the query timeout in milliseconds

    - #### setQueryTimeout

          public DnsClientOptions setQueryTimeout​(long queryTimeout)

      Set the query timeout in milliseconds, i.e the amount of time after a query is considered to be failed.
      Parameters:
        `queryTimeout` - the query timeout in milliseconds
      Returns:
        a reference to this, so the API can be used fluently

    - #### getLogActivity

          public boolean getLogActivity()

      Returns:
        `true` when network activity logging is enabled

    - #### getActivityLogFormat

          public ByteBufFormat getActivityLogFormat()

      Returns:
        `ByteBufFormat` get Netty's log format

    - #### setLogActivity

          public DnsClientOptions setLogActivity​(boolean logActivity)

      Set to true to enable network activity logging: Netty's pipeline is configured for logging on Netty's logger.
      Parameters:
        `logActivity` - true for logging the network activity
      Returns:
        a reference to this, so the API can be used fluently

    - #### setActivityLogFormat

          public DnsClientOptions setActivityLogFormat​(ByteBufFormat activityLogFormat)

      Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger.
      Parameters:
        `activityLogFormat` - format of Netty's logging data
      Returns:
        a reference to this, so the API can be used fluently

    - #### isRecursionDesired

          public boolean isRecursionDesired()

      Return whether or not recursion is desired
      Returns:
        `true` when recursion is desired

    - #### setRecursionDesired

          public DnsClientOptions setRecursionDesired​(boolean recursionDesired)

      Set whether or not recursion is desired
      Parameters:
        `recursionDesired` - the new value
      Returns:
        a reference to this, so the API can be used fluently

    - #### toJson

          public JsonObject toJson()