public final class Address extends Object
no proxy
is explicitly requested), this also includes
that proxy information. For secure connections the address also includes the
SSL socket factory and hostname verifier.
HTTP requests that share the same Address
may also share the same
Connection
.
Constructor and Description |
---|
Address(String uriHost,
int uriPort,
SSLSocketFactory sslSocketFactory,
HostnameVerifier hostnameVerifier,
OkAuthenticator authenticator,
Proxy proxy,
List<Protocol> protocols) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
OkAuthenticator |
getAuthenticator()
Returns the client's authenticator.
|
HostnameVerifier |
getHostnameVerifier()
Returns the hostname verifier, or null if this is not an HTTPS
address.
|
List<Protocol> |
getProtocols()
Returns the protocols the client supports.
|
Proxy |
getProxy()
Returns this address's explicitly-specified HTTP proxy, or null to
delegate to the HTTP client's proxy selector.
|
SSLSocketFactory |
getSslSocketFactory()
Returns the SSL socket factory, or null if this is not an HTTPS
address.
|
String |
getUriHost()
Returns the hostname of the origin server.
|
int |
getUriPort()
Returns the port of the origin server; typically 80 or 443.
|
int |
hashCode() |
public Address(String uriHost, int uriPort, SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier, OkAuthenticator authenticator, Proxy proxy, List<Protocol> protocols) throws UnknownHostException
UnknownHostException
public String getUriHost()
public int getUriPort()
getPort()
accessors, this method never returns -1.public SSLSocketFactory getSslSocketFactory()
public HostnameVerifier getHostnameVerifier()
public OkAuthenticator getAuthenticator()
public List<Protocol> getProtocols()
Protocol.HTTP_11
.public Proxy getProxy()
Copyright © 2014. All Rights Reserved.