org.kth.dks.dks_comm
Class DKSNetAddress

java.lang.Object
  extended by org.kth.dks.dks_comm.DKSNetAddress

public class DKSNetAddress
extends java.lang.Object


Constructor Summary
DKSNetAddress(java.lang.String dksURL)
          Constructs a DKSNetAddress from a DKSNETURL string having the following format: dksnet://[IP]:[PORT]
IP can be either an IP number of a hostname, PORT must be an integer (<=65535) describing the port number of the DKS, The scheme of the url can be in any case, e.g.
DKSNetAddress(java.lang.String newip, int newport)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getDKSNetURL()
          Returns the DKSNetURL representing this DKSNetNetwork in the following format: dksnet://[IP]:[PORT]
IP can be either an IP number of a hostname, PORT must be an integer (<=65535) describing the port number of the DKS, The scheme of the url can be in any case, e.g.
 java.lang.String getIP()
           
 int getPort()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DKSNetAddress

public DKSNetAddress(java.lang.String dksURL)
              throws java.net.MalformedURLException
Constructs a DKSNetAddress from a DKSNETURL string having the following format: dksnet://[IP]:[PORT]
IP can be either an IP number of a hostname, PORT must be an integer (<=65535) describing the port number of the DKS, The scheme of the url can be in any case, e.g. "dksnet://" or "DKSNet://".

Example DKSNETURL "dksnet://localhost:8080"

Parameters:
dksURL - String with the above described format
Throws:
java.net.MalformedURLException - if the string does not match the above description

DKSNetAddress

public DKSNetAddress(java.lang.String newip,
                     int newport)
Method Detail

getDKSNetURL

public java.lang.String getDKSNetURL()
Returns the DKSNetURL representing this DKSNetNetwork in the following format: dksnet://[IP]:[PORT]
IP can be either an IP number of a hostname, PORT must be an integer (<=65535) describing the port number of the DKS, The scheme of the url can be in any case, e.g. "dksnet://" or "DKSNet://".

Example DKSNETURL "dksnet://localhost:8080"

Returns:
String the DKSNETURL representing this object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPort

public int getPort()

getIP

public java.lang.String getIP()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2010. All Rights Reserved.