Holds all of the variables needed to describe an HTTP connection to a host. More...
Inherits Cloneable.
This includes remote host name, port and scheme.
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Public Member Functions | |
HttpHost (final String hostname, int port, final String scheme, final String uri) | |
Creates a new HttpHost , specifying all values. More... | |
HttpHost (final String hostname, int port) | |
Creates a new HttpHost , with default scheme. More... | |
HttpHost (final String hostname) | |
Creates a new HttpHost , with default scheme and port. More... | |
HttpHost (final HttpHost httphost) | |
Copy constructor for HttpHost . More... | |
String | getHostName () |
Returns the host name. More... | |
int | getPort () |
Returns the port. More... | |
String | getSchemeName () |
Returns the scheme name. More... | |
String | toURI () |
Return the host URI, as a string. More... | |
String | toHostString () |
Obtains the host string, without scheme prefix. More... | |
String | toString () |
boolean | equals (final Object obj) |
int | hashCode () |
Static Public Attributes | |
static final String | DEFAULT_SCHEME_NAME = "http" |
The default scheme is "http". More... | |
Protected Attributes | |
final String | hostname |
The host to use. More... | |
final String | lcHostname |
The lowercase host, for equals and hashCode. More... | |
final int | port |
The port to use. More... | |
final String | schemeName |
The scheme. | |
HttpHost | ( | final String | hostname, |
int | port, | ||
final String | scheme, | ||
final String | uri | ||
) |
Constructor for HttpHost.
hostname | the hostname (IP or DNS name) |
port | the port number. -1 indicates the scheme default port. |
scheme | the name of the scheme. null indicates the default scheme |
uri | the complete uri for the request |
HttpHost | ( | final String | hostname, |
int | port | ||
) |
hostname | the hostname (IP or DNS name) |
port | the port number. -1 indicates the scheme default port. |
HttpHost | ( | final String | hostname | ) |
hostname | the hostname (IP or DNS name) |
String getHostName | ( | ) |
int getPort | ( | ) |
-1
if not set String getSchemeName | ( | ) |
String toURI | ( | ) |
String toHostString | ( | ) |
localhost:8080
String toString | ( | ) |
boolean equals | ( | final Object | obj | ) |
int hashCode | ( | ) |
|
static |
|
protected |
|
protected |
|
protected |