public final class Address
extends java.lang.Object
HTTP requests that share the same Address may also share the same Connection.
| Constructor and Description |
|---|
Address(java.lang.String uriHost,
int uriPort,
Dns dns,
javax.net.SocketFactory socketFactory,
javax.net.ssl.SSLSocketFactory sslSocketFactory,
javax.net.ssl.HostnameVerifier hostnameVerifier,
CertificatePinner certificatePinner,
Authenticator proxyAuthenticator,
java.net.Proxy proxy,
java.util.List<Protocol> protocols,
java.util.List<ConnectionSpec> connectionSpecs,
java.net.ProxySelector proxySelector) |
| Modifier and Type | Method and Description |
|---|---|
CertificatePinner |
certificatePinner()
Returns this address's certificate pinner, or null if this is not an HTTPS address.
|
java.util.List<ConnectionSpec> |
connectionSpecs() |
Dns |
dns()
Returns the service that will be used to resolve IP addresses for hostnames.
|
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
javax.net.ssl.HostnameVerifier |
hostnameVerifier()
Returns the hostname verifier, or null if this is not an HTTPS address.
|
java.util.List<Protocol> |
protocols()
Returns the protocols the client supports.
|
java.net.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.
|
java.net.ProxySelector |
proxySelector()
Returns this address's proxy selector.
|
javax.net.SocketFactory |
socketFactory()
Returns the socket factory for new connections.
|
javax.net.ssl.SSLSocketFactory |
sslSocketFactory()
Returns the SSL socket factory, or null if this is not an HTTPS address.
|
java.lang.String |
toString() |
HttpUrl |
url()
Returns a URL with the hostname and port of the origin server.
|
public Address(java.lang.String uriHost,
int uriPort,
Dns dns,
javax.net.SocketFactory socketFactory,
@Nullable
javax.net.ssl.SSLSocketFactory sslSocketFactory,
@Nullable
javax.net.ssl.HostnameVerifier hostnameVerifier,
@Nullable
CertificatePinner certificatePinner,
Authenticator proxyAuthenticator,
@Nullable
java.net.Proxy proxy,
java.util.List<Protocol> protocols,
java.util.List<ConnectionSpec> connectionSpecs,
java.net.ProxySelector proxySelector)
public HttpUrl url()
public Dns dns()
public javax.net.SocketFactory socketFactory()
public Authenticator proxyAuthenticator()
public java.util.List<Protocol> protocols()
Protocol.HTTP_1_1.public java.util.List<ConnectionSpec> connectionSpecs()
public java.net.ProxySelector proxySelector()
@Nullable public java.net.Proxy proxy()
@Nullable public javax.net.ssl.SSLSocketFactory sslSocketFactory()
@Nullable public javax.net.ssl.HostnameVerifier hostnameVerifier()
@Nullable public CertificatePinner certificatePinner()
public boolean equals(@Nullable
java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2017. All Rights Reserved.