public final class Address extends Object
HTTP requests that share the same Address may also share the same Connection.
| Constructor and Description |
|---|
Address(String
|
| Modifier and Type | Method and Description |
|---|---|
CertificatePinner |
certificatePinner()
Returns this address's certificate pinner, or null if this is not an HTTPS address.
|
List |
connectionSpecs()
|
Dns |
dns()
Returns the service that will be used to resolve IP addresses for hostnames.
|
boolean |
equals(Object
|
int |
hashCode()
|
HostnameVerifier |
hostnameVerifier()
Returns the hostname verifier, or null if this is not an HTTPS address.
|
List |
protocols()
Returns the protocols the client supports.
|
Proxy |
proxy()
Returns this address's explicitly-specified HTTP proxy, or null to delegate to the
proxy selector.
|
Authenticator |
proxyAuthenticator()
Returns the client's proxy authenticator.
|
ProxySelector |
proxySelector()
Returns this address's proxy selector.
|
SocketFactory |
socketFactory()
Returns the socket factory for new connections.
|
SSLSocketFactory |
sslSocketFactory()
Returns the SSL socket factory, or null if this is not an HTTPS address.
|
HttpUrl |
url()
Returns a URL with the hostname and port of the origin server.
|
public Address(StringuriHost, int uriPort, Dns dns, SocketFactory socketFactory, SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier, CertificatePinner certificatePinner, Authenticator proxyAuthenticator, Proxy proxy, List <Protocol > protocols, List <ConnectionSpec > connectionSpecs, ProxySelector proxySelector)
public HttpUrlurl()
public Dnsdns()
public SocketFactorysocketFactory()
public AuthenticatorproxyAuthenticator()
public List<Protocol > protocols()
Protocol.HTTP_1_1 .
public List<ConnectionSpec > connectionSpecs()
public ProxySelectorproxySelector()
public Proxyproxy()
public SSLSocketFactorysslSocketFactory()
public HostnameVerifierhostnameVerifier()
public CertificatePinnercertificatePinner()
public boolean equals(Objectother)
public int hashCode()