/** * Called right after a {@link Computer} went offline. * * @since 1.571 */ public void onOffline(@Nonnull Computer c, @CheckForNull OfflineCause cause) { onOffline(c); }
/** * If still connected, disconnect. */ private void closeChannel() { // TODO: race condition between this and the setChannel method. Channel c; synchronized (channelLock) { c = channel; channel = null; absoluteRemoteFs = null; isUnix = null; } if (c != null) { try { c.close(); } catch (IOException e) { logger.log(Level.SEVERE, "Failed to terminate channel to " + getDisplayName(), e); } for (ComputerListener cl : ComputerListener.all()) cl.onOffline(this, offlineCause); } }
@Override public void onRestart() { Computer computer = Jenkins.getInstance().toComputer(); if (computer == null) return; RestartCause cause = new RestartCause(); for (ComputerListener listener: ComputerListener.all()) { listener.onOffline(computer, cause); } }
public void superOnOffline(Computer c) { super.onOffline(c); }
/** * Called right after a {@link Computer} went offline. * * @since 1.571 */ public void onOffline(@Nonnull Computer c, @CheckForNull OfflineCause cause) { onOffline(c); }
/** * If still connected, disconnect. */ private void closeChannel() { // TODO: race condition between this and the setChannel method. Channel c = channel; channel = null; isUnix = null; if (c != null) { try { c.close(); } catch (IOException e) { logger.log(Level.SEVERE, "Failed to terminate channel to " + getDisplayName(), e); } } for (ComputerListener cl : ComputerListener.all()) cl.onOffline(this); }
/** * If still connected, disconnect. */ private void closeChannel() { // TODO: race condition between this and the setChannel method. Channel c = channel; channel = null; isUnix = null; if (c != null) { try { c.close(); } catch (IOException e) { logger.log(Level.SEVERE, "Failed to terminate channel to " + getDisplayName(), e); } } for (ComputerListener cl : ComputerListener.all()) cl.onOffline(this); }
@Override public void onOffline(Computer c) { initPython(); if (pexec.isImplemented(5)) { pexec.execPythonVoid("on_offline", c); } else { super.onOffline(c); } }
/** * If still connected, disconnect. */ private void closeChannel() { // TODO: race condition between this and the setChannel method. Channel c = channel; channel = null; isUnix = null; if (c != null) { try { c.close(); } catch (IOException e) { logger.log(Level.SEVERE, "Failed to terminate channel to " + getDisplayName(), e); } } for (ComputerListener cl : ComputerListener.all()) cl.onOffline(this); }
/** * If still connected, disconnect. */ private void closeChannel() { // TODO: race condition between this and the setChannel method. Channel c = channel; channel = null; isUnix = null; if (c != null) { try { c.close(); } catch (IOException e) { logger.log(Level.SEVERE, "Failed to terminate channel to " + getDisplayName(), e); } } for (ComputerListener cl : ComputerListener.all()) { cl.onOffline(this); } }
/** * If still connected, disconnect. */ private void closeChannel() { // TODO: race condition between this and the setChannel method. Channel c; synchronized (channelLock) { c = channel; channel = null; absoluteRemoteFs = null; isUnix = null; } if (c != null) { try { c.close(); } catch (IOException e) { logger.log(Level.SEVERE, "Failed to terminate channel to " + getDisplayName(), e); } for (ComputerListener cl : ComputerListener.all()) cl.onOffline(this, offlineCause); } }
@Override public void onRestart() { Computer computer = Jenkins.getInstance().toComputer(); if (computer == null) return; RestartCause cause = new RestartCause(); for (ComputerListener listener: ComputerListener.all()) { listener.onOffline(computer, cause); } }