Package org.asynchttpclient.proxy
Class ProxyServer
- java.lang.Object
-
- org.asynchttpclient.proxy.ProxyServer
-
public class ProxyServer extends Object
Represents a proxy server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProxyServer.Builder
-
Constructor Summary
Constructors Constructor Description ProxyServer(String host, int port, int securedPort, @Nullable Realm realm, List<String> nonProxyHosts, ProxyType proxyType, @Nullable Function<Request,io.netty.handler.codec.http.HttpHeaders> customHeaders)
ProxyServer(String host, int port, int securedPort, Realm realm, List<String> nonProxyHosts, ProxyType proxyType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable Function<Request,io.netty.handler.codec.http.HttpHeaders>
getCustomHeaders()
String
getHost()
List<String>
getNonProxyHosts()
int
getPort()
ProxyType
getProxyType()
@Nullable Realm
getRealm()
int
getSecuredPort()
boolean
isIgnoredForHost(String hostname)
Checks whether proxy should be used according to nonProxyHosts settings of it, or we want to go directly to target host.
-
-
-
Method Detail
-
getHost
public String getHost()
-
getPort
public int getPort()
-
getSecuredPort
public int getSecuredPort()
-
getRealm
@Nullable public @Nullable Realm getRealm()
-
getProxyType
public ProxyType getProxyType()
-
getCustomHeaders
@Nullable public @Nullable Function<Request,io.netty.handler.codec.http.HttpHeaders> getCustomHeaders()
-
isIgnoredForHost
public boolean isIgnoredForHost(String hostname)
Checks whether proxy should be used according to nonProxyHosts settings of it, or we want to go directly to target host. Ifnull
proxy is passed in, this method returns true -- since there is NO proxy, we should avoid to use it. Simple hostname pattern matching using "*" are supported, but only as prefixes.- Parameters:
hostname
- the hostname- Returns:
- true if we have to ignore proxy use (obeying non-proxy hosts settings), false otherwise.
- See Also:
- Networking Properties
-
-