@StaplerAccessibleType public final class ProxyConfiguration extends AbstractDescribableImpl<ProxyConfiguration> implements Saveable, Serializable
Use open(URL)
to open a connection with the proxy setting.
Proxy authentication (including NTLM) is implemented by setting a default
Authenticator
which provides a PasswordAuthentication
(as described in the Java 6 tech note
Http Authentication).
Jenkins.proxy
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
ProxyConfiguration.DescriptorImpl |
Modifier and Type | Field and Description |
---|---|
String |
name |
String |
noProxyHost
List of host names that shouldn't use proxy, as typed by users.
|
int |
port |
Constructor and Description |
---|
ProxyConfiguration(String name,
int port) |
ProxyConfiguration(String name,
int port,
String userName,
String password) |
ProxyConfiguration(String name,
int port,
String userName,
String password,
String noProxyHost) |
ProxyConfiguration(String name,
int port,
String userName,
String password,
String noProxyHost,
String testUrl) |
Modifier and Type | Method and Description |
---|---|
Proxy |
createProxy()
Deprecated.
|
Proxy |
createProxy(String host) |
static Proxy |
createProxy(String host,
String name,
int port,
String noProxyHost) |
String |
getEncryptedPassword() |
static InputStream |
getInputStream(URL url) |
List<Pattern> |
getNoProxyHostPatterns()
Returns the list of properly formatted no proxy host names.
|
static List<Pattern> |
getNoProxyHostPatterns(String noProxyHost)
Returns the list of properly formatted no proxy host names.
|
String |
getPassword() |
String |
getTestUrl() |
String |
getUserName() |
static XmlFile |
getXmlFile() |
static ProxyConfiguration |
load() |
static URLConnection |
open(URL url)
This method should be used wherever
URL.openConnection() to internet URLs is invoked directly. |
void |
save()
Persists the state of this object into XML.
|
getDescriptor
public final String name
public final int port
public final String noProxyHost
getNoProxyHostPatterns()
public ProxyConfiguration(String name, int port)
public ProxyConfiguration(String name, int port, String userName, String password)
public ProxyConfiguration(String name, int port, String userName, String password, String noProxyHost)
public String getUserName()
public String getPassword()
public String getEncryptedPassword()
public String getTestUrl()
public List<Pattern> getNoProxyHostPatterns()
public static List<Pattern> getNoProxyHostPatterns(String noProxyHost)
@Deprecated public Proxy createProxy()
createProxy(String)
public void save() throws IOException
Saveable
For making a bulk change efficiently, see BulkChange
.
To support listeners monitoring changes to this object, call SaveableListener.fireOnChange(hudson.model.Saveable, hudson.XmlFile)
save
in interface Saveable
IOException
- if the persistence failed.public static XmlFile getXmlFile()
public static ProxyConfiguration load() throws IOException
IOException
public static URLConnection open(URL url) throws IOException
URL.openConnection()
to internet URLs is invoked directly.IOException
public static InputStream getInputStream(URL url) throws IOException
IOException
Copyright © 2004–2019. All rights reserved.