public class TiDNS extends Object
Modifier and Type | Method and Description |
---|---|
void |
changeServer(String primaryAddress,
String secondaryAddress)
Change the DNS server address, effective at next startup
|
static TiDNS |
getInstance()
Gets the DNS object
|
String[] |
getServer()
Gets the DNS server address
|
void |
shutdown()
Shutdown the DNS service
|
void |
startup()
Startup the DNS service
|
public void changeServer(String primaryAddress, String secondaryAddress) throws IOException
primaryAddress
- primary address of DNS serversecondaryAddress
- secondary address of DNS serverIOException
- If a TiDNS error occursNullPointerException
- If primaryAddress or secondaryAddress is nullpublic static TiDNS getInstance()
public String[] getServer() throws IOException
IOException
- If a TiDNS error occurspublic void shutdown() throws IOException
IOException
- If a TiDNS error occurspublic void startup() throws IOException
IOException
- If a TiDNS error occurs