@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { core.launch(computer, listener); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { getLauncher().launch(computer, listener); }
/** * Launches the agent for the given {@link Computer}. * * <p> * If the agent is launched successfully, {@link SlaveComputer#setChannel(InputStream, OutputStream, TaskListener, Channel.Listener)} * should be invoked in the end to notify Hudson of the established connection. * The operation could also fail, in which case there's no need to make any callback notification, * (except to notify the user of the failure through {@link StreamTaskListener}.) * Also note that the normal return of this method call does not necessarily signify a successful launch. * If someone programmatically calls this method and wants to find out if the launch was a success, * use {@link SlaveComputer#isOnline()} at the end. * * <p> * This method must operate synchronously. Asynchrony is provided by {@link Computer#connect(boolean)} and * its correct operation depends on this. * * @param listener * The progress of the launch, as well as any error, should be sent to this listener. * * @throws IOException * if the method throws an {@link IOException} or {@link InterruptedException}, the launch was considered * a failure and the stack trace is reported into the listener. This handling is just so that the implementation * of this method doesn't have to diligently catch those exceptions. */ public void launch(SlaveComputer computer, TaskListener listener) throws IOException , InterruptedException { // to remain compatible with the legacy implementation that overrides the old signature launch(computer,cast(listener)); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { core.launch(computer, listener); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { core.launch(computer, listener); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { core.launch(computer, listener); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { core.launch(computer, listener); }
public void superLaunch(SlaveComputer computer, StreamTaskListener listener) throws IOException, InterruptedException { super.launch(computer, listener); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { core.launch(computer, listener); }
public void superLaunch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { super.launch(computer, listener); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { getLauncher().launch(computer, listener); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { getLauncher().launch(computer, listener); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { getLauncher().launch(computer, listener); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { getLauncher().launch(computer, listener); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { getLauncher().launch(computer, listener); }
/** * Launches the slave agent for the given {@link Computer}. * * <p> * If the slave agent is launched successfully, {@link SlaveComputer#setChannel(java.io.InputStream, java.io.OutputStream, TaskListener, hudson.remoting.Channel.Listener)} * should be invoked in the end to notify Hudson of the established connection. * The operation could also fail, in which case there's no need to make any callback notification, * (except to notify the user of the failure through {@link StreamTaskListener}.) * * <p> * This method must operate synchronously. Asynchrony is provided by {@link Computer#connect(boolean)} and * its correct operation depends on this. * * @param listener * The progress of the launch, as well as any error, should be sent to this listener. * * @throws IOException * if the method throws an {@link IOException} or {@link InterruptedException}, the launch was considered * a failure and the stack trace is reported into the listener. This handling is just so that the implementation * of this method doesn't have to dilligently catch those exceptions. */ public void launch(SlaveComputer computer, TaskListener listener) throws IOException , InterruptedException { // to remain compatible with the legacy implementation that overrides the old signature launch(computer,cast(listener)); }
@Override public void launch(@Nonnull SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { Slave n = computer.getNode(); if (!(n instanceof JCloudsSlave)) { LOGGER.warning(getClass().getSimpleName() + " used to launch incompatible computer type " + computer.getClass()); return; } JCloudsSlave node = (JCloudsSlave) n; Integer configuredTimeout = node.getSlaveOptions().getStartTimeout(); if (configuredTimeout == null) throw new NullPointerException(); long timeout = node.getCreatedTime() + configuredTimeout; do { launcher(computer).launch(computer, listener); if (computer.isOnline()) return; listener.getLogger().println("Launcher failed to bring the node online. Retrying ..."); Thread.sleep(2000); } while (System.currentTimeMillis() < timeout); listener.getLogger().println("Launcher failed to bring the node online within timeout."); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { initPython(); if (pexec.isImplemented(1)) { pexec.execPythonVoid("launch", computer, listener); } else { super.launch(computer, listener); } }
@Override public void launch(SlaveComputer computer, StreamTaskListener listener) throws IOException, InterruptedException { initPython(); if (pexec.isImplemented(2)) { pexec.execPythonVoid("launch", computer, listener); } else { super.launch(computer, listener); } }
/** * @param computer {@link hudson.model.Computer} for which agent should be launched * @param listener The progress of the launch, as well as any error, should be sent to this listener. * @return true, if successfully launched, otherwise false */ protected boolean delegateLaunch(SlaveComputer computer, TaskListener listener) { try { log(listener, "Starting stage 2 launcher (" + delegate.getClass().getSimpleName() + ")"); getCore().launch(computer, listener); log(listener, "Stage 2 launcher completed"); return computer.isOnline(); } catch (IOException e) { log(listener, "Unable to launch: " + e.getMessage()); return false; } catch (InterruptedException e) { log(listener, "Unable to launch: " + e.getMessage()); return false; } }