de.fhkl.zw.mkup.rattrap.tools
Class WhoIsClient

java.lang.Object
  extended by de.fhkl.zw.mkup.rattrap.tools.WhoIsClient

public class WhoIsClient
extends java.lang.Object

Author:
rob this class is a small tool to query whois-servers for a given ipaddress. it will try to contact in the first whois.arin.net in the first place. if the reply contains a redirection information, the client will contact the server that is extracted from the redirection reply

Constructor Summary
WhoIsClient()
          constructor
 
Method Summary
 java.lang.String getIpaddress()
           
 int getPort()
           
 IpRange getSubnetInformation()
          extracts the subnet information from the whois-answer. can only be executed after querying a whoisserver
 java.lang.String getWhoisAnswer()
           
 void getWhoisInformation(java.lang.String ipaddress)
          gets the whois - information for the submitted ipaddress
 java.lang.String getWhoisServer()
           
 void setIpaddress(java.lang.String ipaddress)
           
 void setPort(int port)
           
 void setWhoisServer(java.lang.String whoisServer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WhoIsClient

public WhoIsClient()
constructor

Method Detail

getWhoisInformation

public void getWhoisInformation(java.lang.String ipaddress)
gets the whois - information for the submitted ipaddress

Parameters:
ipaddress -

getSubnetInformation

public IpRange getSubnetInformation()
extracts the subnet information from the whois-answer. can only be executed after querying a whoisserver

Returns:

getIpaddress

public java.lang.String getIpaddress()
Returns:
Returns the ipaddress.

setIpaddress

public void setIpaddress(java.lang.String ipaddress)
Parameters:
ipaddress - The ipaddress to set.

getPort

public int getPort()
Returns:
Returns the port.

setPort

public void setPort(int port)
Parameters:
port - The port to set.

getWhoisServer

public java.lang.String getWhoisServer()
Returns:
Returns the whoisServer.

setWhoisServer

public void setWhoisServer(java.lang.String whoisServer)
Parameters:
whoisServer - The whoisServer to set.

getWhoisAnswer

public java.lang.String getWhoisAnswer()
Returns:
Returns the whoisAnswer.