@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { core.launch(computer, listener); }
@Override public void afterDisconnect(SlaveComputer computer, TaskListener listener) { core.afterDisconnect(computer, listener); }
@Override public void beforeDisconnect(SlaveComputer computer, TaskListener listener) { core.beforeDisconnect(computer, listener); }
/** * Allows the {@link ComputerLauncher} to tidy-up after a disconnect. * * <p> * This method is invoked after the {@link Channel} to this computer is terminated. * * <p> * Disconnect operation is performed asynchronously, so there's no guarantee * that the corresponding {@link SlaveComputer} exists for the duration of the * operation. */ public void afterDisconnect(SlaveComputer computer, TaskListener listener) { // to remain compatible with the legacy implementation that overrides the old signature afterDisconnect(computer,cast(listener)); }
/** * Allows the {@link ComputerLauncher} to prepare for a disconnect. * * <p> * This method is invoked before the {@link Channel} to this computer is terminated, * thus the channel is still accessible from {@link SlaveComputer#getChannel()}. * If the channel is terminated unexpectedly, this method will not be invoked, * as the channel is already gone. * * <p> * Disconnect operation is performed asynchronously, so there's no guarantee * that the corresponding {@link SlaveComputer} exists for the duration of the * operation. */ public void beforeDisconnect(SlaveComputer computer, TaskListener listener) { // to remain compatible with the legacy implementation that overrides the old signature beforeDisconnect(computer,cast(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 boolean isLaunchSupported() { return launcher.isLaunchSupported(); }
/** * 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)); }
/** * Allows the {@link ComputerLauncher} to tidy-up after a disconnect. * * <p> * This method is invoked after the {@link Channel} to this computer is terminated. * * <p> * Disconnect operation is performed asynchronously, so there's no guarantee * that the corresponding {@link SlaveComputer} exists for the duration of the * operation. */ public void afterDisconnect(SlaveComputer computer, TaskListener listener) { // to remain compatible with the legacy implementation that overrides the old signature afterDisconnect(computer,cast(listener)); }
/** * Allows the {@link ComputerLauncher} to prepare for a disconnect. * * <p> This method is invoked before the {@link Channel} to this computer is * terminated, thus the channel is still accessible from * {@link SlaveComputer#getChannel()}. If the channel is terminated * unexpectedly, this method will not be invoked, as the channel is already * gone. * * <p> Disconnect operation is performed asynchronously, so there's no * guarantee that the corresponding {@link SlaveComputer} exists for the * duration of the operation. */ public void beforeDisconnect(SlaveComputer computer, TaskListener listener) { // to remain compatible with the legacy implementation that overrides the old signature beforeDisconnect(computer, cast(listener)); }
@Override public boolean isLaunchSupported() { return core.isLaunchSupported(); }
@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 afterDisconnect(SlaveComputer computer, TaskListener listener) { getLauncher().afterDisconnect(computer, listener); }
@Override public void beforeDisconnect(SlaveComputer computer, TaskListener listener) { getLauncher().beforeDisconnect(computer, listener); }
/** * Allows the {@link ComputerLauncher} to tidy-up after a disconnect. * * <p> This method is invoked after the {@link Channel} to this computer is * terminated. * * <p> Disconnect operation is performed asynchronously, so there's no * guarantee that the corresponding {@link SlaveComputer} exists for the * duration of the operation. */ public void afterDisconnect(SlaveComputer computer, TaskListener listener) { // to remain compatible with the legacy implementation that overrides the old signature afterDisconnect(computer, cast(listener)); }
/** * Allows the {@link ComputerLauncher} to prepare for a disconnect. * * <p> * This method is invoked before the {@link hudson.remoting.Channel} to this computer is terminated, * thus the channel is still accessible from {@link SlaveComputer#getChannel()}. * If the channel is terminated unexpectedly, this method will not be invoked, * as the channel is already gone. * * <p> * Disconnect operation is performed asynchronously, so there's no guarantee * that the corresponding {@link SlaveComputer} exists for the duration of the * operation. */ public void beforeDisconnect(SlaveComputer computer, TaskListener listener) { // to remain compatible with the legacy implementation that overrides the old signature beforeDisconnect(computer,cast(listener)); }
@Override public boolean isLaunchSupported() { return core.isLaunchSupported(); }
@Override public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException { core.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)); }