https://qiita.com/nururuv/items/b269af6ac5ac472ceab1
https://qiita.com/satosystems/items/ad49cefa837e80c5083b
https://qiita.com/naginx/items/21e77c67f02a1ae65a29
HttpURLConnection timeout settings
https://stackoverflow.com/questions/2799938/httpurlconnection-timeout-settings
URL url = new URL("http://example.com");
URLConnection conn = url.openConnection();
conn.setRequestProperty("Authorization", "Basic " + Base64.encodeToString("username:password".getBytes(), Base64.NO_WRAP));
// conn.setRequestProperty("Authorization", "Basic " + Base64.getEncoder().encodeToString("username:password".getBytes()));
conn.setConnectTimeout(5000); //set timeout to 5 seconds
InputStream is = conn.getInputStream();
Jenkins に関して
http://[jenkins-server]/[command]
exit shutdown jenkins
restart restart jenkins
reload to reload the configuration