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 class
RestartListener.Default
Default 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 registeredLabelFinder
s.static boolean
isAllReady()
Returns true iff all the listeners OKed the restart.abstract boolean
isReadyToRestart()
Called periodically during the safe restart.void
onRestart()
Called immediately before the restart is actually triggered.
-
-
-
Method Detail
-
isReadyToRestart
public abstract boolean isReadyToRestart() throws IOException, InterruptedException
Called periodically during the safe restart.- Returns:
- false to block the restart
- Throws:
IOException
InterruptedException
-
onRestart
public void onRestart()
Called immediately before the restart is actually triggered.
-
all
public static ExtensionList<RestartListener> all()
Returns all the registeredLabelFinder
s.
-
isAllReady
public static boolean isAllReady() throws IOException, InterruptedException
Returns true iff all the listeners OKed the restart.- Throws:
IOException
InterruptedException
-
-