Package org.jenkinsci.remoting.engine
Class JnlpAgentEndpointResolver
java.lang.Object
org.jenkinsci.remoting.engine.JnlpEndpointResolver
org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver
- Since:
- 3.0
- Author:
- Stephen Connolly
-
Constructor Summary
ConstructorDescriptionJnlpAgentEndpointResolver
(List<String> jenkinsUrls, String agentName, String credentials, String proxyCredentials, String tunnel, SSLSocketFactory sslSocketFactory, boolean disableHttpsCertValidation, Duration noReconnectAfter) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine if certificate checking should be ignored for JNLP endpointstatic URLConnection
openURLConnection
(URL url, String agentName, String credentials, String proxyCredentials, SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier) Gets URL connection.resolve()
void
setCredentials
(String credentials) void
setCredentials
(String user, String pass) void
setDisableHttpsCertValidation
(boolean disableHttpsCertValidation) Sets if the HTTPs certificate check should be disabled.void
setProxyCredentials
(String proxyCredentials) void
setProxyCredentials
(String user, String pass) void
setSslSocketFactory
(SSLSocketFactory sslSocketFactory) void
void
Methods inherited from class org.jenkinsci.remoting.engine.JnlpEndpointResolver
getIdentity
-
Constructor Details
-
JnlpAgentEndpointResolver
-
-
Method Details
-
getSslSocketFactory
-
setSslSocketFactory
-
getCredentials
-
setCredentials
-
setCredentials
-
getProxyCredentials
-
setProxyCredentials
-
setProxyCredentials
-
getTunnel
-
setTunnel
-
isDisableHttpsCertValidation
public boolean isDisableHttpsCertValidation()Determine if certificate checking should be ignored for JNLP endpoint- Returns:
true
if the HTTPs certificate is disabled, endpoint check is ignored
-
setDisableHttpsCertValidation
public void setDisableHttpsCertValidation(boolean disableHttpsCertValidation) Sets if the HTTPs certificate check should be disabled. This behavior is not recommended. -
resolve
- Specified by:
resolve
in classJnlpEndpointResolver
- Throws:
IOException
-
waitForReady
- Specified by:
waitForReady
in classJnlpEndpointResolver
- Throws:
InterruptedException
-
openURLConnection
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static URLConnection openURLConnection(URL url, @CheckForNull String agentName, @CheckForNull String credentials, @CheckForNull String proxyCredentials, @CheckForNull SSLSocketFactory sslSocketFactory, @CheckForNull HostnameVerifier hostnameVerifier) throws IOException Gets URL connection. If http_proxy environment variable exists, the connection uses the proxy. Credentials can be passed e.g. to support running Jenkins behind a (reverse) proxy requiring authorization FIXME: similar to hudson.remoting.Util.openURLConnection which is still used in hudson.remoting.Launcher- Throws:
IOException
-