public class DnsClientOptions extends Object
Modifier and Type | Field and 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 and Description |
---|
DnsClientOptions() |
DnsClientOptions(DnsClientOptions other) |
DnsClientOptions(JsonObject json) |
Modifier and Type | Method and 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() |
public static final int DEFAULT_PORT
-1
(configured by VertxOptions.getAddressResolverOptions()
)public static final String DEFAULT_HOST
null
(configured by VertxOptions.getAddressResolverOptions()
)public static final long DEFAULT_QUERY_TIMEOUT
5000
public static final boolean DEFAULT_LOG_ENABLED
public static final ByteBufFormat DEFAULT_LOG_ACTIVITY_FORMAT
public static final boolean DEFAULT_RECURSION_DESIRED
true
public DnsClientOptions()
public DnsClientOptions(JsonObject json)
public DnsClientOptions(DnsClientOptions other)
public int getPort()
public DnsClientOptions setPort(int port)
public String getHost()
public DnsClientOptions setHost(String host)
public long getQueryTimeout()
public DnsClientOptions setQueryTimeout(long queryTimeout)
queryTimeout
- the query timeout in millisecondspublic boolean getLogActivity()
true
when network activity logging is enabledpublic ByteBufFormat getActivityLogFormat()
ByteBufFormat
get Netty's log formatpublic DnsClientOptions setLogActivity(boolean logActivity)
logActivity
- true for logging the network activitypublic DnsClientOptions setActivityLogFormat(ByteBufFormat activityLogFormat)
activityLogFormat
- format of Netty's logging datapublic boolean isRecursionDesired()
true
when recursion is desiredpublic DnsClientOptions setRecursionDesired(boolean recursionDesired)
recursionDesired
- the new valuepublic JsonObject toJson()
Copyright © 2024 Eclipse. All rights reserved.