Interface ProxyProvider.Builder

Enclosing class:
ProxyProvider

public static interface ProxyProvider.Builder
  • Method Details

    • username

      ProxyProvider.Builder username(String username)
      The proxy username.
      Parameters:
      username - The proxy username.
      Returns:
      this
    • password

      ProxyProvider.Builder password(Function<? super String,? extends String> password)
      A function to supply the proxy's password from the username.
      Parameters:
      password - A function to supply the proxy's password from the username.
      Returns:
      this
    • port

      ProxyProvider.Builder port(int port)
      The proxy port to connect to.
      Parameters:
      port - The proxy port to connect to.
      Returns:
      this
    • nonProxyHosts

      ProxyProvider.Builder nonProxyHosts(String nonProxyHostsPattern)
      Regular expression (using java.util.regex) for a configured list of hosts that should be reached directly, bypassing the proxy.
      Parameters:
      nonProxyHostsPattern - Regular expression (using java.util.regex) for a configured list of hosts that should be reached directly, bypassing the proxy.
      Returns:
      this
    • nonProxyHostsPredicate

      ProxyProvider.Builder nonProxyHostsPredicate(Predicate<SocketAddress> nonProxyHostsPredicate)
      A standard predicate expression for a configured list of hosts that should be reached directly, bypassing the proxy.
      Parameters:
      nonProxyHostsPredicate - A Predicate Predicate on SocketAddress that returns true if the host should bypass the configured proxy
      Returns:
      this
      Since:
      0.9.10
    • httpHeaders

      A consumer to add request headers for the http proxy.
      Parameters:
      headers - A consumer to add request headers for the http proxy.
      Returns:
      this
    • connectTimeoutMillis

      ProxyProvider.Builder connectTimeoutMillis(long connectTimeoutMillis)
      The proxy connect timeout in millis. Default to 10000 ms. If this value set as non-positive value, there is no connect timeout.
      Parameters:
      connectTimeoutMillis - The proxy connect timeout in millis.
      Returns:
      this
    • build

      ProxyProvider build()
      Builds new ProxyProvider.
      Returns:
      builds new ProxyProvider