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,
javax.net.SocketFactory socketFactory,
javax.net.ssl.SSLSocketFactory sslSocketFactory,
javax.net.ssl.HostnameVerifier hostnameVerifier,
CertificatePinner certificatePinner,
Authenticator authenticator,
java.net.Proxy proxy,
java.util.List<Protocol> protocols,
java.util.List<ConnectionSpec> connectionSpecs) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
Authenticator |
getAuthenticator()
Returns the client's authenticator.
|
java.util.List<ConnectionSpec> |
getConnectionSpecs() |
javax.net.ssl.HostnameVerifier |
getHostnameVerifier()
Returns the hostname verifier, or null if this is not an HTTPS
address.
|
java.util.List<Protocol> |
getProtocols()
Returns the protocols the client supports.
|
java.net.Proxy |
getProxy()
Returns this address's explicitly-specified HTTP proxy, or null to
delegate to the HTTP client's proxy selector.
|
javax.net.SocketFactory |
getSocketFactory()
Returns the socket factory for new connections.
|
javax.net.ssl.SSLSocketFactory |
getSslSocketFactory()
Returns the SSL socket factory, or null if this is not an HTTPS
address.
|
java.lang.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(java.lang.String uriHost, int uriPort, javax.net.SocketFactory socketFactory, javax.net.ssl.SSLSocketFactory sslSocketFactory, javax.net.ssl.HostnameVerifier hostnameVerifier, CertificatePinner certificatePinner, Authenticator authenticator, java.net.Proxy proxy, java.util.List<Protocol> protocols, java.util.List<ConnectionSpec> connectionSpecs)
public java.lang.String getUriHost()
public int getUriPort()
getPort()
accessors, this method never returns -1.public javax.net.SocketFactory getSocketFactory()
public javax.net.ssl.SSLSocketFactory getSslSocketFactory()
public javax.net.ssl.HostnameVerifier getHostnameVerifier()
public Authenticator getAuthenticator()
public java.util.List<Protocol> getProtocols()
Protocol.HTTP_1_1
.public java.util.List<ConnectionSpec> getConnectionSpecs()
public java.net.Proxy getProxy()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2014. All Rights Reserved.