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 |
---|---|
String |
asDetailedString()
Deprecated.
as of 0.9.7. Use
toString() |
String |
asSimpleString()
Deprecated.
as of 0.9.7. Use
toString() |
static ProxyProvider.TypeSpec |
builder()
Creates a builder for
ProxyProvider |
boolean |
equals(Object o) |
static ProxyProvider |
findProxySupport(Bootstrap b)
Find Proxy support in the given client bootstrap
|
java.util.function.Supplier<? extends InetSocketAddress> |
getAddress()
The supplier for the address to connect to.
|
Pattern |
getNonProxyHosts()
Deprecated.
as of 0.9.10. Use
getNonProxyHostsPredicate() . This method will be removed in version 1.0.0. |
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. |
boolean |
shouldProxy(String hostName)
Deprecated.
as of 0.9.10. use
shouldProxy(SocketAddress) . This method will be removed in version 1.0.0. |
String |
toString() |
public static ProxyProvider.TypeSpec builder()
ProxyProvider
@Nullable public static ProxyProvider findProxySupport(Bootstrap b)
b
- a bootstrap to searchProxyProvider
found or nullpublic final ProxyProvider.Proxy getType()
public final java.util.function.Supplier<? extends InetSocketAddress> getAddress()
@Nullable @Deprecated public final Pattern getNonProxyHosts()
getNonProxyHostsPredicate()
. This method will be removed in version 1.0.0.using java.util.regex
) for a configured
list of hosts that should be reached directly, bypassing the proxy.using java.util.regex
) for
a configured list of hosts that should be reached directly, bypassing the
proxy.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 proxy@Deprecated public boolean shouldProxy(@Nullable String hostName)
shouldProxy(SocketAddress)
. This method will be removed in version 1.0.0.hostName
- the hostname to test@Deprecated public String asSimpleString()
toString()
@Deprecated public String asDetailedString()
toString()