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) |
Supplier<? extends InetSocketAddress> |
getAddress()
Deprecated.
as of 1.2.0. Prefer using
getSocketAddress() .
This method will be removed in 1.3.0. |
Predicate<SocketAddress> |
getNonProxyHostsPredicate()
A predicate
Predicate on SocketAddress that returns true when the provided address should be
reached directly, bypassing the proxy. |
SocketAddress |
getProxyAddress()
The address to connect to.
|
Supplier<? extends SocketAddress> |
getSocketAddress()
The supplier for the address to connect to.
|
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()
@Deprecated public final Supplier<? extends InetSocketAddress> getAddress()
getSocketAddress()
.
This method will be removed in 1.3.0.public final Supplier<? extends SocketAddress> getSocketAddress()
public final SocketAddress getProxyAddress()
public final Predicate<SocketAddress> getNonProxyHostsPredicate()
Predicate
on SocketAddress
that returns true when the provided address should be
reached directly, bypassing the proxy.Predicate
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)