Package hudson.model
Class RestartListener
- java.lang.Object
-
- hudson.model.RestartListener
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
Jenkins.MasterRestartNotifyier,RestartListener.Default
public abstract class RestartListener extends Object implements ExtensionPoint
Extension point that allows plugins to veto the restart.- Since:
- 1.376
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRestartListener.DefaultDefault logic.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description RestartListener()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ExtensionList<RestartListener>all()Returns all the registeredLabelFinders.static booleanisAllReady()Returns true iff all the listeners OKed the restart.abstract booleanisReadyToRestart()Called periodically during the safe restart.voidonRestart()Called immediately before the restart is actually triggered.
-
-
-
Method Detail
-
isReadyToRestart
public abstract boolean isReadyToRestart() throws IOException, InterruptedExceptionCalled periodically during the safe restart.- Returns:
- false to block the restart
- Throws:
IOExceptionInterruptedException
-
onRestart
public void onRestart()
Called immediately before the restart is actually triggered.
-
all
public static ExtensionList<RestartListener> all()
Returns all the registeredLabelFinders.
-
isAllReady
public static boolean isAllReady() throws IOException, InterruptedExceptionReturns true iff all the listeners OKed the restart.- Throws:
IOExceptionInterruptedException
-
-