edu.UCL.satin.impl.advertising.location
Class IPLocation

java.lang.Object
  extended byedu.UCL.satin.impl.remotecomponents.Location
      extended byedu.UCL.satin.impl.advertising.location.IPLocation

public class IPLocation
extends Location

Represents a Location with an IP address

Author:
Stefanos Zachariadis

Field Summary
private  java.lang.String ipaddress
           
 
Constructor Summary
IPLocation(java.lang.String ip)
          Instantiates an IPLocation
 
Method Summary
 java.lang.String asString()
           
static IPLocation generateLocalLocation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ipaddress

private final java.lang.String ipaddress
Constructor Detail

IPLocation

public IPLocation(java.lang.String ip)
Instantiates an IPLocation

Parameters:
ip - the IP address of the Location
Method Detail

generateLocalLocation

public static IPLocation generateLocalLocation()
                                        throws java.net.UnknownHostException
Returns:
an IPLocation representing the local host
Throws:
java.net.UnknownHostException

asString

public java.lang.String asString()
Specified by:
asString in class Location
Returns:
An encoding of the Location as a textual string.