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 StringDEFAULT_HOSTThe default value for the host =null(configured byVertxOptions.getAddressResolverOptions())static ByteBufFormatDEFAULT_LOG_ACTIVITY_FORMATThe default ByteBufFormat is SIMPLEstatic booleanDEFAULT_LOG_ENABLEDThe default log enabled = falsestatic intDEFAULT_PORTThe default value for the port =-1(configured byVertxOptions.getAddressResolverOptions())static longDEFAULT_QUERY_TIMEOUTThe default value for the query timeout in millis =5000static booleanDEFAULT_RECURSION_DESIREDThe 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 ByteBufFormatgetActivityLogFormat()StringgetHost()Get the host name to be used by this client in requests.booleangetLogActivity()intgetPort()Get the port to be used by this client in requests.longgetQueryTimeout()booleanisRecursionDesired()Return whether or not recursion is desiredDnsClientOptionssetActivityLogFormat(ByteBufFormat activityLogFormat)Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger.DnsClientOptionssetHost(String host)Set the host name to be used by this client in requests.DnsClientOptionssetLogActivity(boolean logActivity)Set to true to enable network activity logging: Netty's pipeline is configured for logging on Netty's logger.DnsClientOptionssetPort(int port)Set the port to be used by this client in requests.DnsClientOptionssetQueryTimeout(long queryTimeout)Set the query timeout in milliseconds, i.e the amount of time after a query is considered to be failed.DnsClientOptionssetRecursionDesired(boolean recursionDesired)Set whether or not recursion is desiredJsonObjecttoJson()
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
The default value for the port =-1(configured byVertxOptions.getAddressResolverOptions())- See Also:
- Constant Field Values
-
DEFAULT_HOST
public static final String DEFAULT_HOST
The default value for the host =null(configured byVertxOptions.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:
truewhen network activity logging is enabled
-
getActivityLogFormat
public ByteBufFormat getActivityLogFormat()
- Returns:
ByteBufFormatget 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:
truewhen 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()
-
-