public class DnsClientOptions extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HOST
The default value for the host = localhost
|
static int |
DEFAULT_PORT
The default value for the port = 53
|
static long |
DEFAULT_QUERY_TIMEOUT
The default value for the query timeout in millis = 5000
|
Constructor and Description |
---|
DnsClientOptions() |
DnsClientOptions(DnsClientOptions other) |
DnsClientOptions(JsonObject json) |
Modifier and Type | Method and Description |
---|---|
String |
getHost()
Get the host name to be used by this client in requests.
|
int |
getPort()
Get the port to be used by this client in requests.
|
long |
getQueryTimeout() |
DnsClientOptions |
setHost(String host)
Set the host name to be used by this client in requests.
|
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.
|
JsonObject |
toJson() |
public static final int DEFAULT_PORT
public static final String DEFAULT_HOST
public static final long DEFAULT_QUERY_TIMEOUT
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 JsonObject toJson()
Copyright © 2017. All rights reserved.