@return the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', followed by the port of the URL.
()
| 140 | * a ':', followed by the port of the URL. |
| 141 | */ |
| 142 | @JsxGetter |
| 143 | public String getHost() { |
| 144 | if (url_ == null) { |
| 145 | return null; |
| 146 | } |
| 147 | final int port = url_.getPort(); |
| 148 | return url_.getHost() + (port > 0 ? ":" + port : ""); |
| 149 | } |
| 150 | |
| 151 | /** |
| 152 | * Sets the {@code host} property. |