public final class ProxyProvider extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ProxyProvider.AddressSpec |
static interface |
ProxyProvider.Builder |
static class |
ProxyProvider.Proxy
Proxy Type
|
static interface |
ProxyProvider.TypeSpec |
Modifier and Type | Method and Description |
---|---|
void |
addProxyHandler(Channel channel) |
static ProxyProvider.TypeSpec |
builder()
Creates a builder for
ProxyProvider |
boolean |
equals(Object o) |
java.util.function.Supplier<? extends InetSocketAddress> |
getAddress()
The supplier for the address to connect to.
|
java.util.function.Predicate<SocketAddress> |
getNonProxyHostsPredicate()
A predicate
Predicate on SocketAddress that returns true when the provided address should be
reached directly, bypassing the proxy |
ProxyProvider.Proxy |
getType()
The proxy type
|
int |
hashCode() |
ProxyHandler |
newProxyHandler()
Return a new eventual
ProxyHandler |
boolean |
shouldProxy(SocketAddress address)
Returns true when the given
SocketAddress should be reached via the configured proxy. |
String |
toString() |
public static ProxyProvider.TypeSpec builder()
ProxyProvider
public final ProxyProvider.Proxy getType()
public final java.util.function.Supplier<? extends InetSocketAddress> getAddress()
public final java.util.function.Predicate<SocketAddress> getNonProxyHostsPredicate()
Predicate
on SocketAddress
that returns true when the provided address should be
reached directly, bypassing the proxyPredicate
to test the incoming SocketAddress
if it should be reached
directly, bypassing the proxypublic final ProxyHandler newProxyHandler()
ProxyHandler
ProxyHandler
public boolean shouldProxy(SocketAddress address)
SocketAddress
should be reached via the configured proxy. When the method
returns false, the client should reach the address directly and bypass the proxyaddress
- the address to testInetSocketAddress
and hostname candidate to proxypublic void addProxyHandler(Channel channel)