Package org.jenkinsci.remoting.engine
Class JnlpAgentEndpointResolver
- java.lang.Object
-
- org.jenkinsci.remoting.engine.JnlpEndpointResolver
-
- org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver
-
public class JnlpAgentEndpointResolver extends JnlpEndpointResolver
- Since:
- 3.0
- Author:
- Stephen Connolly
-
-
Constructor Summary
Constructors Constructor Description JnlpAgentEndpointResolver(List<String> jenkinsUrls, String agentName, String credentials, String proxyCredentials, String tunnel, SSLSocketFactory sslSocketFactory, boolean disableHttpsCertValidation)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCredentials()
String
getProxyCredentials()
SSLSocketFactory
getSslSocketFactory()
String
getTunnel()
boolean
isDisableHttpsCertValidation()
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.JnlpAgentEndpoint
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
setTunnel(String tunnel)
void
waitForReady()
-
Methods inherited from class org.jenkinsci.remoting.engine.JnlpEndpointResolver
getIdentity
-
-
-
-
Method Detail
-
getSslSocketFactory
public SSLSocketFactory getSslSocketFactory()
-
setSslSocketFactory
public void setSslSocketFactory(SSLSocketFactory sslSocketFactory)
-
getCredentials
public String getCredentials()
-
setCredentials
public void setCredentials(String credentials)
-
getProxyCredentials
public String getProxyCredentials()
-
setProxyCredentials
public void setProxyCredentials(String proxyCredentials)
-
getTunnel
@CheckForNull public String getTunnel()
-
setTunnel
public void setTunnel(@CheckForNull String tunnel)
-
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
@CheckForNull public JnlpAgentEndpoint resolve() throws IOException
- Specified by:
resolve
in classJnlpEndpointResolver
- Throws:
IOException
-
waitForReady
public void waitForReady() throws InterruptedException
- 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
-
-