Package hudson.lifecycle
Class SystemdLifecycle
- java.lang.Object
-
- hudson.lifecycle.Lifecycle
-
- hudson.lifecycle.ExitLifecycle
-
- hudson.lifecycle.SystemdLifecycle
-
- All Implemented Interfaces:
ExtensionPoint
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension(optional=true) public class SystemdLifecycle extends ExitLifecycle
Lifecycle
that delegates its responsibility tosystemd(1)
.- Author:
- Basil Crow
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description SystemdLifecycle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onExtendTimeout(long timeout, TimeUnit unit)
Tell the service manager to extend the startup or shutdown timeout.void
onReady()
Called when Jenkins startup is finished or when Jenkins has finished reloading its configuration.void
onReload(String user, String remoteAddr)
Called when Jenkins is reloading its configuration.void
onStatusUpdate(String status)
Called when Jenkins service state has changed.void
onStop(String user, String remoteAddr)
Called when Jenkins is beginning its shutdown.-
Methods inherited from class hudson.lifecycle.ExitLifecycle
restart
-
Methods inherited from class hudson.lifecycle.Lifecycle
canRestart, canRewriteHudsonWar, get, getHudsonWar, rewriteHudsonWar, verifyRestartable
-
-
-
-
Method Detail
-
onReady
public void onReady()
Description copied from class:Lifecycle
Called when Jenkins startup is finished or when Jenkins has finished reloading its configuration.
-
onReload
public void onReload(@NonNull String user, @CheckForNull String remoteAddr)
Description copied from class:Lifecycle
Called when Jenkins is reloading its configuration.Callers must also send an
Lifecycle.onReady()
notification when Jenkins has finished reloading its configuration.
-
onStop
public void onStop(@NonNull String user, @CheckForNull String remoteAddr)
Description copied from class:Lifecycle
Called when Jenkins is beginning its shutdown.
-
onExtendTimeout
public void onExtendTimeout(long timeout, @NonNull TimeUnit unit)
Description copied from class:Lifecycle
Tell the service manager to extend the startup or shutdown timeout. The value specified is a time during which eitherLifecycle.onExtendTimeout(long, TimeUnit)
must be called again or startup/shutdown must complete.- Overrides:
onExtendTimeout
in classLifecycle
- Parameters:
timeout
- The amount by which to extend the timeout.unit
- The time unit of the timeout argument.
-
onStatusUpdate
public void onStatusUpdate(String status)
Description copied from class:Lifecycle
Called when Jenkins service state has changed.- Overrides:
onStatusUpdate
in classLifecycle
- Parameters:
status
- The status string. This is free-form and can be used for various purposes: general state feedback, completion percentages, human-readable error message, etc.
-
-