public static interface ProxyProvider.Builder
Modifier and Type | Method and Description |
---|---|
ProxyProvider |
build()
Builds new ProxyProvider
|
ProxyProvider.Builder |
connectTimeoutMillis(long connectTimeoutMillis)
The proxy connect timeout in millis.
|
ProxyProvider.Builder |
httpHeaders(java.util.function.Consumer<HttpHeaders> headers)
A consumer to add request headers for the http proxy.
|
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. |
ProxyProvider.Builder |
nonProxyHostsPredicate(java.util.function.Predicate<SocketAddress> nonProxyHostsPredicate)
A standard predicate expression for a configured list of hosts that should be reached directly, bypassing
the proxy.
|
ProxyProvider.Builder |
password(java.util.function.Function<? super String,? extends String> password)
A function to supply the proxy's password from the username.
|
ProxyProvider.Builder |
port(int port)
The proxy port to connect to.
|
ProxyProvider.Builder |
username(String username)
The proxy username.
|
ProxyProvider.Builder username(String username)
username
- The proxy username.this
ProxyProvider.Builder password(java.util.function.Function<? super String,? extends String> password)
password
- A function to supply the proxy's password from the username.this
ProxyProvider.Builder port(int port)
port
- The proxy port to connect to.this
ProxyProvider.Builder nonProxyHosts(String nonProxyHostsPattern)
using java.util.regex
) for a configured
list of hosts that should be reached directly, bypassing the proxy.nonProxyHostsPattern
- Regular expression (using java.util.regex
)
for a configured list of hosts that should be reached directly, bypassing the proxy.this
ProxyProvider.Builder nonProxyHostsPredicate(java.util.function.Predicate<SocketAddress> nonProxyHostsPredicate)
nonProxyHostsPredicate
- A Predicate Predicate
on SocketAddress
that returns
true if the host should bypass the configured proxythis
ProxyProvider.Builder httpHeaders(java.util.function.Consumer<HttpHeaders> headers)
headers
- A consumer to add request headers for the http proxy.this
ProxyProvider.Builder connectTimeoutMillis(long connectTimeoutMillis)
connectTimeoutMillis
- The proxy connect timeout in millis.this
ProxyProvider build()