Class SystemdLifecycle

java.lang.Object
com.github.jpmsilva.jsystemd.SystemdLifecycle
All Implemented Interfaces:
Lifecycle, Phased, SmartLifecycle

public class SystemdLifecycle extends Object implements SmartLifecycle
Implementation of SmartLifecycle that logs systemd integration status on startup, and sends a stopping signal when the application is shutting down.
Author:
Joao Silva
See Also:
  • Constructor Details

    • SystemdLifecycle

      public SystemdLifecycle(Systemd systemd)
      Creates a new instance using the provided Systemd as the integration point.
      Parameters:
      systemd - the Systemd to send status information to
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface Lifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface Lifecycle