public final class Address extends Object
HTTP requests that share the same Address
may also share the same
Connection
.
Constructor and Description |
---|
Address(String uriHost,
int uriPort,
SocketFactory socketFactory,
SSLSocketFactory sslSocketFactory,
HostnameVerifier hostnameVerifier,
Authenticator authenticator,
Proxy proxy,
List<Protocol> protocols) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
Authenticator |
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.
|
SocketFactory |
getSocketFactory()
Returns the socket factory for new connections.
|
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, SocketFactory socketFactory, SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier, Authenticator authenticator, Proxy proxy, List<Protocol> protocols) throws UnknownHostException
UnknownHostException
public String getUriHost()
public int getUriPort()
getPort()
accessors, this method never returns -1.public SocketFactory getSocketFactory()
public SSLSocketFactory getSslSocketFactory()
public HostnameVerifier getHostnameVerifier()
public Authenticator getAuthenticator()
public List<Protocol> getProtocols()
Protocol.HTTP_1_1
.public Proxy getProxy()
Copyright © 2014. All Rights Reserved.