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 Details

    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      The default value for the port = -1 (configured by VertxOptions.getAddressResolverOptions())
      See Also:
    • 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:
    • DEFAULT_LOG_ENABLED

      public static final boolean DEFAULT_LOG_ENABLED
      The default log enabled = false
      See Also:
    • 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:
  • Constructor Details

    • DnsClientOptions

      public DnsClientOptions()
    • DnsClientOptions

      public DnsClientOptions(JsonObject json)
    • DnsClientOptions

      public DnsClientOptions(DnsClientOptions other)
  • Method Details

    • 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()