Methods Summary |
---|
public java.lang.Object | clone()Copies the current instance.
ConnectionAddress retval = new ConnectionAddress();
if (address != null)
retval.address = (Host) address.clone();
retval.ttl = ttl;
retval.port = port;
return retval;
|
public java.lang.String | encode()Gets the string encoded version of this object.
String encoded_string = "";
if (address != null) encoded_string = address.encode();
if (ttl != 0 && port != 0) {
encoded_string += Separators.SLASH +
ttl + Separators.SLASH + port;
} else if (ttl != 0) {
encoded_string += Separators.SLASH + ttl;
}
return encoded_string;
|
public Host | getAddress()Gets the target host address.
return address;
|
public int | getPort()Gets the target port address.
return port;
|
public int | getTtl()Gets the time to live parameter.
return ttl;
|
public void | setAddress(Host a)Sets the address member.
address = a;
|
public void | setPort(int p)Sets the port member.
port = p;
|
public void | setTtl(int ttl)Sets the time to live member.
this.ttl = ttl;
|