public class HTTPAddress
extends java.lang.Object
URL
object
and is mostly used to compare if connections are to the same place.Constructor | Description |
---|---|
HTTPAddress(java.lang.String host,
int port,
boolean doSSL) |
Construct an HTTPAdrress by specifying the host port and protocol(https or http).
|
HTTPAddress(java.net.URL url) |
Constructs an HTTPAddress from a URL.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object o) |
|
boolean |
getdoSSL() |
Should ssl be done on this HTTPAddress.
|
java.lang.String |
getHost() |
Returns the host portion of this HTTPAddress.
|
int |
getPort() |
Returns the port portion of this HTTPAddress.
|
java.net.URL |
getURL() |
Gets the
URL of this HTTPAddress. |
int |
hashCode() |
|
java.lang.String |
toString() |
public HTTPAddress(java.net.URL url)
url
- the url to make the HTTPAddress from.public HTTPAddress(java.lang.String host, int port, boolean doSSL)
host
- the host to connect too, this can be an ip address or hostname.port
- the port to connect too.doSSL
- If ssl should be used or not on this connection.public java.lang.String getHost()
public int getPort()
public boolean getdoSSL()
public java.net.URL getURL()
URL
of this HTTPAddress. Note this will not have a path, query or user in it.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object