Class Proxy.Builder
java.lang.Object
io.helidon.webclient.api.Proxy.Builder
- All Implemented Interfaces:
Builder<Proxy.Builder, Proxy>, Supplier<Proxy>
- Enclosing class:
Proxy
Fluent API builder for
Proxy.-
Method Summary
Modifier and TypeMethodDescriptionaddNoProxy(String noProxyHost) Configure a host or IP pattern that is not going through a proxy; IP patterns resolve host-name targets locally and bind direct routes to the matching address.build()Build the instance from this builder.Configure a metric from configuration.forceHttpConnect(boolean forceHttpConnect) Forces HTTP CONNECT with the proxy server.Sets a new host value.password(char[] password) Sets a new password for the proxy.port(int port) Sets a port value.type(Proxy.ProxyType type) Sets a new proxy type.Sets a new username for the proxy.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault Proxyget()default Proxy.Builderidentity()Instance of this builder as the correct type.default Proxy.Builderupdate(Consumer<Proxy.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
build
-
config
Configure a metric from configuration. The following configuration key are used:Client Metric configuration options key default description type no defaultSets which type is this proxy. See Proxy.ProxyTypehost no defaultHost of the proxy port 80Port of the proxy username no defaultProxy username password no defaultProxy password httpConnect falseSpecify whether the HTTP client will always execute HTTP CONNECT. no-proxy no defaultContains host or IP patterns which should be excluded from using proxy. IP patterns require local DNS resolution of host names and bind a direct route to the matching address. - Parameters:
config- configuration to configure this proxy- Returns:
- updated builder instance
-
type
Sets a new proxy type.- Parameters:
type- proxy type- Returns:
- updated builder instance
- Throws:
NullPointerException- when type is null
-
forceHttpConnect
Forces HTTP CONNECT with the proxy server. Otherwise it will not execute HTTP CONNECT when the request is plain HTTP with no authentication.- Parameters:
forceHttpConnect- HTTP CONNECT- Returns:
- updated builder instance
-
host
Sets a new host value.- Parameters:
host- host- Returns:
- updated builder instance
- Throws:
NullPointerException- when host is null
-
port
Sets a port value.- Parameters:
port- port- Returns:
- updated builder instance
-
username
Sets a new username for the proxy.- Parameters:
username- proxy username- Returns:
- updated builder instance
-
password
Sets a new password for the proxy.- Parameters:
password- proxy password- Returns:
- updated builder instance
-
addNoProxy
Configure a host or IP pattern that is not going through a proxy; IP patterns resolve host-name targets locally and bind direct routes to the matching address.Options are:
- IP Address, such as
192.168.1.1 - IP V6 Address, such as
[2001:db8:85a3:8d3:1319:8a2e:370:7348] - Hostname, such as
localhost - Domain name, such as
helidon.io - Domain name and all sub-domains, such as
.helidon.io(leading dot) - Combination of all options from above with a port, such as
.helidon.io:80
- Parameters:
noProxyHost- to exclude from proxying- Returns:
- updated builder instance
- IP Address, such as
-