Package hudson.model
Class RestartListener
java.lang.Object
hudson.model.RestartListener
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
Jenkins.MasterRestartNotifyier
,RestartListener.Default
Extension point that allows plugins to veto the restart.
- Since:
- 1.376
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<RestartListener>
all()
Returns all the registeredLabelFinder
s.static boolean
Returns true iff all the listeners OKed the restart.abstract boolean
Called periodically during the safe restart.void
Called immediately before the restart is actually triggered.
-
Constructor Details
-
RestartListener
public RestartListener()
-
-
Method Details
-
isReadyToRestart
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
Returns all the registeredLabelFinder
s. -
isAllReady
Returns true iff all the listeners OKed the restart.- Throws:
IOException
InterruptedException
-