Class JnlpAgentEndpointResolver


  • public class JnlpAgentEndpointResolver
    extends JnlpEndpointResolver
    Since:
    3.0
    Author:
    Stephen Connolly
    • Constructor Detail

      • JnlpAgentEndpointResolver

        public JnlpAgentEndpointResolver​(@NonNull
                                         List<String> jenkinsUrls,
                                         String agentName,
                                         String credentials,
                                         String proxyCredentials,
                                         String tunnel,
                                         SSLSocketFactory sslSocketFactory,
                                         boolean disableHttpsCertValidation)
    • Method Detail

      • setSslSocketFactory

        public void setSslSocketFactory​(SSLSocketFactory sslSocketFactory)
      • getCredentials

        public String getCredentials()
      • setCredentials

        public void setCredentials​(String credentials)
      • setCredentials

        public void setCredentials​(String user,
                                   String pass)
      • getProxyCredentials

        public String getProxyCredentials()
      • setProxyCredentials

        public void setProxyCredentials​(String proxyCredentials)
      • setProxyCredentials

        public void setProxyCredentials​(String user,
                                        String pass)
      • 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.
      • 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