类 Route

java.lang.Object
com.lark.oapi.okhttp.Route

public final class Route extends Object
The concrete route used by a connection to reach an abstract origin server. When creating a connection the client has many options:
  • HTTP proxy: a proxy server may be explicitly configured for the client. Otherwise the proxy selector is used. It may return multiple proxies to attempt.
  • IP address: whether connecting directly to an origin server or a proxy, opening a socket requires an IP address. The DNS server may return multiple IP addresses to attempt.

Each route is a specific selection of these options.

  • 构造器详细资料

  • 方法详细资料

    • address

      public Address address()
    • proxy

      public Proxy proxy()
      Returns the Proxy of this route. Warning: This may disagree with Address.proxy when it is null. When the address's proxy is null, the proxy selector is used.
    • socketAddress

      public InetSocketAddress socketAddress()
    • requiresTunnel

      public boolean requiresTunnel()
      Returns true if this route tunnels HTTPS through an HTTP proxy. See RFC 2817, Section 5.2.
    • equals

      public boolean equals(@Nullable Object other)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object