Class ProxyRoute

java.lang.Object
io.helidon.webclient.api.ProxyRoute

public final class ProxyRoute extends Object
Effective proxy route selected for one logical WebClient target.

The selected route is distinct from configured proxy policy. For example, a system proxy selector or a configured no-proxy rule can select a direct route even though the request carries a non-direct Proxy configuration. Address evidence retained for an IP-based no-proxy match does not participate in route equality or hashing.

  • Method Details

    • kind

      public ProxyRoute.Kind kind()
      Selected route kind.
      Returns:
      route kind
    • direct

      public boolean direct()
      Whether this is a direct route.
      Returns:
      whether the route is direct
    • supportsDatagrams

      public boolean supportsDatagrams()
      Whether the route supports UDP datagrams.

      Helidon currently supports datagrams only on a direct route. Ordinary HTTP CONNECT and SOCKS routes do not imply CONNECT-UDP, MASQUE, or SOCKS UDP-associate support.

      Returns:
      whether datagrams are supported
    • addressBound

      public boolean addressBound()
      Whether this direct route is bound to the address that matched an IP-based no-proxy rule.
      Returns:
      whether the route is address-bound
    • forwardProxy

      public boolean forwardProxy()
      Whether HTTP/1.1 must use absolute-form request targets on this route.
      Returns:
      whether this is an HTTP forward-proxy route
    • proxyAddress

      public Optional<InetSocketAddress> proxyAddress()
      Configured or system-selected proxy address.
      Returns:
      proxy address, empty for a direct route
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object