org.neverfear.whois
Class WhoisServer

java.lang.Object
  extended by org.neverfear.whois.WhoisServer

public class WhoisServer
extends java.lang.Object

Represents a whois server.

Author:
doug@neverfear.org

Field Summary
private  ServerResolver resolver
           
private  java.lang.String tld
           
 
Constructor Summary
WhoisServer(java.lang.String tld, ServerResolver resolver)
          Construct a whois server instance for the given top level domain and an appropriate resolver instance.
 
Method Summary
 java.lang.String getTLD()
          Get the top level domain this server handles.
 WhoisResponse query(java.lang.String domain)
          Query this server for the given domain name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resolver

private ServerResolver resolver

tld

private java.lang.String tld
Constructor Detail

WhoisServer

public WhoisServer(java.lang.String tld,
                   ServerResolver resolver)
Construct a whois server instance for the given top level domain and an appropriate resolver instance.

Parameters:
tld - A top level domain.
resolver - A compatible resolver.
Method Detail

getTLD

public java.lang.String getTLD()
Get the top level domain this server handles.

Returns:
A top level domain.

query

public WhoisResponse query(java.lang.String domain)
                    throws java.net.UnknownHostException,
                           java.io.IOException
Query this server for the given domain name.

Parameters:
domain - A domain name.
Returns:
A WhoisResponse object.
Throws:
java.net.UnknownHostException
java.io.IOException