类 Address
java.lang.Object
com.lark.oapi.okhttp.Address
A specification for a connection to an origin server. For simple connections, this is the
server's hostname and port. If an explicit proxy is requested (or no
proxy is explicitly requested), this also includes that proxy information. For secure
connections the address also includes the SSL socket factory, hostname verifier, and certificate
pinner.
HTTP requests that share the same Address may also share the same Connection.
-
构造器概要
构造器构造器说明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) -
方法概要
修饰符和类型方法说明Returns this address's certificate pinner, or null if this is not an HTTPS address.dns()Returns the service that will be used to resolve IP addresses for hostnames.booleaninthashCode()Returns the hostname verifier, or null if this is not an HTTPS address.Returns the protocols the client supports.proxy()Returns this address's explicitly-specified HTTP proxy, or null to delegate to the proxy selector.Returns the client's proxy authenticator.Returns this address's proxy selector.Returns the socket factory for new connections.Returns the SSL socket factory, or null if this is not an HTTPS address.toString()url()Returns a URL with the hostname and port of the origin server.
-
构造器详细资料
-
Address
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)
-
-
方法详细资料
-
url
Returns a URL with the hostname and port of the origin server. The path, query, and fragment of this URL are always empty, since they are not significant for planning a route. -
dns
Returns the service that will be used to resolve IP addresses for hostnames. -
socketFactory
Returns the socket factory for new connections. -
proxyAuthenticator
Returns the client's proxy authenticator. -
protocols
Returns the protocols the client supports. This method always returns a non-null list that contains minimallyProtocol.HTTP_1_1. -
connectionSpecs
-
proxySelector
Returns this address's proxy selector. Only used if the proxy is null. If none of this selector's proxies are reachable, a direct connection will be attempted. -
proxy
Returns this address's explicitly-specified HTTP proxy, or null to delegate to the proxy selector. -
sslSocketFactory
Returns the SSL socket factory, or null if this is not an HTTPS address. -
hostnameVerifier
Returns the hostname verifier, or null if this is not an HTTPS address. -
certificatePinner
Returns this address's certificate pinner, or null if this is not an HTTPS address. -
equals
-
hashCode
public int hashCode() -
toString
-