|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.whois.Whois
public class Whois
Implements the basic functionality of a Whois client.
Example Usage:
Whois whois = new Whois(); try { // attempts to lookup information about domain myserver.com String results = whois.query("myserver.com"); System.out.println(results); } catch(WhoisException e) { System.out.println(e); }
Constructor Summary | |
---|---|
Whois()
Creates a new Whois instance. |
|
Whois(java.lang.String hostname)
Creates a new Whois instance with hostname of whois server as argument. |
Method Summary | |
---|---|
void |
clearProxySettings()
Clears proxy server values. |
java.lang.String |
getHostname()
Gets hostname of Whois server. |
int |
getPort()
Gets port of Whois server. |
int |
getTimeout()
Gets the timeout for opening a Whois connection. |
java.lang.String |
query(java.lang.String command)
Connects to Whois server and performs Whois query. |
void |
setHostname(java.lang.String str)
Sets hostname of Whois server. |
void |
setPort(int port)
Sets port of Whois server. |
void |
setProxyAuthentication(java.lang.String proxyUsername,
java.lang.String proxyPassword)
Sets the username and password to use when for authentication with proxy server. |
void |
setProxyHost(java.lang.String proxyHostname,
int proxyPort)
Sets the proxy hostname and port for this connection. |
void |
setProxyType(java.lang.String proxyType)
Sets the proxy type will be used for this connection. |
void |
setTimeout(int timeout)
Sets the timeout for opening a Whois connection. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Whois()
public Whois(java.lang.String hostname)
hostname
- the hostname of whois serverMethod Detail |
---|
public void setPort(int port)
port
- the port of Whois serverpublic int getPort()
public void setHostname(java.lang.String str)
str
- the hostname of Whois serverpublic java.lang.String getHostname()
public void setTimeout(int timeout)
timeout
- in millisecondspublic int getTimeout()
public void setProxyAuthentication(java.lang.String proxyUsername, java.lang.String proxyPassword)
#clearProxySettings
method.
proxyUsername
- the proxy usernameproxyPassword
- the proxy passwordclearProxySettings()
public void setProxyHost(java.lang.String proxyHostname, int proxyPort)
#clearProxySettings
method.
proxyHostname
- the hostname or ip address of the proxy serverproxyPort
- the port of the proxy serverclearProxySettings()
public void setProxyType(java.lang.String proxyType)
proxyType
- The proxy type. Valid values: HTTP, SOCKS5public void clearProxySettings()
public java.lang.String query(java.lang.String command) throws WhoisException
command
- the domain or command to query
WhoisException
- if a Whois or I/O error occurs
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |