- java.lang.Object
-
- io.helidon.webclient.Proxy
-
public class Proxy extends Object
A definition of a proxy server to use for outgoing requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Proxy.Builder
Fluent API builder forProxy
.static class
Proxy.ProxyType
Type of the proxy.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Proxy.Builder
builder()
Fluent API builder for new instances.static Proxy
create()
Create from environment and system properties.static Proxy
create(Config config)
Create a new proxy instance from configuration.boolean
equals(Object o)
Optional<ChannelHandler>
handler(URI address)
Creates new proxy channel handler.int
hashCode()
static Proxy
noProxy()
A Proxy instance that does not proxy requests.
-
-
-
Method Detail
-
builder
public static Proxy.Builder builder()
Fluent API builder for new instances.- Returns:
- a new builder
-
noProxy
public static Proxy noProxy()
A Proxy instance that does not proxy requests.- Returns:
- a new instance with no proxy definition
-
create
public static Proxy create(Config config)
Create a new proxy instance from configuration.proxy: http: uri: https://www.example.org https: uri: https://www.example.org no-proxy: ["*.example.org", "localhost"]
- Parameters:
config
- configuration, should be located on a key that has proxy as a subkey- Returns:
- proxy instance
-
create
public static Proxy create()
Create from environment and system properties.- Returns:
- a proxy instance configured based on this system settings
-
handler
public Optional<ChannelHandler> handler(URI address)
Creates new proxy channel handler.- Parameters:
address
- request address- Returns:
- channel handler
-
-