public String call() throws IOException { final Channel ch = getChannelOrFail(); StringWriter sw = new StringWriter(); try (PrintWriter pw = new PrintWriter(sw)) { ch.dumpExportTable(pw); } return sw.toString(); } }
/** * Dumps the contents of the export table. */ public void doDumpExportTable( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { // this is a debug probe and may expose sensitive information checkPermission(Jenkins.ADMINISTER); rsp.setContentType("text/plain"); try (PrintWriter w = new PrintWriter(rsp.getCompressedWriter(req))) { VirtualChannel vc = getChannel(); if (vc instanceof Channel) { w.println("Master to slave"); ((Channel) vc).dumpExportTable(w); w.flush(); // flush here once so that even if the dump from the agent fails, the client gets some useful info w.println("\n\n\nSlave to master"); w.print(vc.call(new DumpExportTableTask())); } else { w.println(Messages.Computer_BadChannel()); } } }
public String call() throws IOException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); Channel.current().dumpExportTable(pw); pw.close(); return sw.toString(); } }
public String call() throws IOException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); Channel.current().dumpExportTable(pw); pw.close(); return sw.toString(); } }
public String call() throws IOException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); Channel.current().dumpExportTable(pw); pw.close(); return sw.toString(); } }
public String call() throws IOException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); Channel.current().dumpExportTable(pw); pw.close(); return sw.toString(); } }
public String call() throws IOException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); Channel.current().dumpExportTable(pw); pw.close(); return sw.toString(); } }
/** * Dumps the contents of the export table. */ public void doDumpExportTable( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { // this is a debug probe and may expose sensitive information checkPermission(Hudson.ADMINISTER); rsp.setContentType("text/plain"); PrintWriter w = new PrintWriter(rsp.getCompressedWriter(req)); VirtualChannel vc = getChannel(); if (vc instanceof Channel) { w.println("Master to slave"); ((Channel)vc).dumpExportTable(w); w.flush(); // flush here once so that even if the dump from the slave fails, the client gets some useful info w.println("\n\n\nSlave to master"); w.print(vc.call(new DumpExportTableTask())); } else { w.println(Messages.Computer_BadChannel()); } w.close(); }
/** * Dumps the contents of the export table. */ public void doDumpExportTable( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { // this is a debug probe and may expose sensitive information checkPermission(Hudson.ADMINISTER); rsp.setContentType("text/plain"); PrintWriter w = new PrintWriter(rsp.getCompressedWriter(req)); VirtualChannel vc = getChannel(); if (vc instanceof Channel) { w.println("Master to slave"); ((Channel)vc).dumpExportTable(w); w.flush(); // flush here once so that even if the dump from the slave fails, the client gets some useful info w.println("\n\n\nSlave to master"); w.print(vc.call(new DumpExportTableTask())); } else { w.println(Messages.Computer_BadChannel()); } w.close(); }
/** * Dumps the contents of the export table. */ public void doDumpExportTable( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { // this is a debug probe and may expose sensitive information checkPermission(Hudson.ADMINISTER); rsp.setContentType("text/plain"); PrintWriter w = new PrintWriter(rsp.getCompressedWriter(req)); VirtualChannel vc = getChannel(); if (vc instanceof Channel) { w.println("Master to slave"); ((Channel)vc).dumpExportTable(w); w.flush(); // flush here once so that even if the dump from the slave fails, the client gets some useful info w.println("\n\n\nSlave to master"); w.print(vc.call(new DumpExportTableTask())); } else { w.println(Messages.Computer_BadChannel()); } w.close(); }
/** * Dumps the contents of the export table. */ public void doDumpExportTable( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { // this is a debug probe and may expose sensitive information checkPermission(Jenkins.ADMINISTER); rsp.setContentType("text/plain"); try (PrintWriter w = new PrintWriter(rsp.getCompressedWriter(req))) { VirtualChannel vc = getChannel(); if (vc instanceof Channel) { w.println("Master to slave"); ((Channel) vc).dumpExportTable(w); w.flush(); // flush here once so that even if the dump from the agent fails, the client gets some useful info w.println("\n\n\nSlave to master"); w.print(vc.call(new DumpExportTableTask())); } else { w.println(Messages.Computer_BadChannel()); } } }
/** * Dumps the contents of the export table. */ public void doDumpExportTable(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, InterruptedException { // this is a debug probe and may expose sensitive information checkPermission(Hudson.ADMINISTER); rsp.setContentType("text/plain"); PrintWriter w = new PrintWriter(rsp.getCompressedWriter(req)); VirtualChannel vc = getChannel(); if (vc instanceof Channel) { w.println("Master to slave"); ((Channel) vc).dumpExportTable(w); w.flush(); // flush here once so that even if the dump from the slave fails, the client gets some useful info w.println("\n\n\nSlave to master"); w.print(vc.call(new DumpExportTableTask())); } else { w.println(Messages.Computer_BadChannel()); } w.close(); }