com.vaadin.flow.server.frontend.installer.
Class ProxyConfig.Proxy
- java.lang.Object
-
- com.vaadin.flow.server.frontend.installer.ProxyConfig.Proxy
-
All Implemented Interfaces:
Enclosing class:
public static class ProxyConfig.Proxy extends Object implements Serializable
Class for holding proxy information.
See Also:
-
-
Field Summary
Fields Modifier and Type Field and Description String
host
Proxy host.
String
id
Id of proxy.
String
nonProxyHosts
Excluded hosts string delimited by '|'.
String
password
Password for proxy.
int
port
Proxy port.
String
protocol
Protocol used for proxy.
String
username
User name for proxy.
-
Constructor Summary
Constructors Constructor and Description Proxy(String id, String proxyUrl, String nonProxyHosts)
Construct a Proxy object out of a proxy url.
Proxy(String id, String protocol, String host, int port, String username, String password, String nonProxyHosts)
Construct a Proxy object.
-
Method Summary
All Methods Modifier and Type Method and Description URI
getUri()
Get the proxy uri.
boolean
isNonProxyHost(String host)
Check if given host is excluded for proxy.
boolean
isSecure()
Check if the proxy is secure.
String
toString()
boolean
useAuthentication()
Check if proxy uses authentication.
-
-
-
Field Detail
-
id
public final String id
Id of proxy.
-
protocol
public final String protocol
Protocol used for proxy.
-
host
public final String host
Proxy host.
-
port
public final int port
Proxy port.
-
username
public final String username
User name for proxy.
-
password
public final String password
Password for proxy.
-
nonProxyHosts
public final String nonProxyHosts
Excluded hosts string delimited by '|'.
-
-
Constructor Detail
-
Proxy
public Proxy(String id, String protocol, String host, int port, String username, String password, String nonProxyHosts)
Construct a Proxy object.
Parameters:
id
- proxy idprotocol
- proxy protocolhost
- proxy hostport
- proxy portusername
- user name for proxypassword
- password for proxynonProxyHosts
- excluded hosts string delimited by '|'
-
-
Method Detail
-
useAuthentication
public boolean useAuthentication()
Check if proxy uses authentication.
Returns:
true if we have a non empty username
-
getUri
public URI getUri()
Get the proxy uri.
Returns:
URI for this proxy
-
isSecure
public boolean isSecure()
Check if the proxy is secure.
Returns:
true is protocol is https
-
isNonProxyHost
public boolean isNonProxyHost(String host)
Check if given host is excluded for proxy.
Parameters:
host
- host to checkReturns:
true if host matches a nonProxyHosts pattern
-
-