Class ProxyConfig
- java.lang.Object
-
- com.vaadin.flow.server.frontend.installer.ProxyConfig
-
public class ProxyConfig extends Object
Proxy configuration used for downloads and executions.Derived from eirslett/frontend-maven-plugin
For internal use only. May be renamed or removed in a future release.
- Since:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProxyConfig.Proxy
Class for holding proxy information.
-
Constructor Summary
Constructors Constructor Description ProxyConfig(List<ProxyConfig.Proxy> proxies)
Create a new proxy configuration with given proxies.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProxyConfig.Proxy
getInsecureProxy()
Get first proxy that is not secure.ProxyConfig.Proxy
getProxyForUrl(String requestUrl)
Get a proxy for url.ProxyConfig.Proxy
getSecureProxy()
Get a defined secure proxy.boolean
isEmpty()
Check if no proxies have been defined.
-
-
-
Constructor Detail
-
ProxyConfig
public ProxyConfig(List<ProxyConfig.Proxy> proxies)
Create a new proxy configuration with given proxies.- Parameters:
proxies
- list of available proxies
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Check if no proxies have been defined.- Returns:
- true if we have no proxies
-
getProxyForUrl
public ProxyConfig.Proxy getProxyForUrl(String requestUrl)
Get a proxy for url.- Parameters:
requestUrl
- url to get proxy for- Returns:
- Proxy if one found, else null.
-
getSecureProxy
public ProxyConfig.Proxy getSecureProxy()
Get a defined secure proxy.- Returns:
- first secure proxy from the proxy list, or null if no secure proxies.
-
getInsecureProxy
public ProxyConfig.Proxy getInsecureProxy()
Get first proxy that is not secure.- Returns:
- first proxy that is not secure from the proxy list, or null if no secure proxies.
-
-