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