Package de.afoo.sdnotify
Class NOOPSDNotify
java.lang.Object
de.afoo.sdnotify.NOOPSDNotify
- All Implemented Interfaces:
SDNotify
NOOP Implementation of the SDNotify interface to be used when we are not running under systemd.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanNotify systemd that a D-Bus error has occurred.booleanerrno(int errno) Notify systemd that an error has occurred.booleanextendTimeout(Duration duration) Tells the service manager to extend the startup, runtime or shutdown service timeout corresponding the current state.booleanmainPid(int pid) Inform systemd of the main pid of the service.booleanready()Notify systemd that the service has started successfully.booleanNotify systemd that the service is currently reloading.booleanSend a free form status message to systemd.booleanstopping()Notify systemd that the service is stopping.booleanwatchdog()Update the watchdog timestamp for services with WatchDogSec enabled.booleanAn error that should be handled by the watchdog options occured.
-
Constructor Details
-
NOOPSDNotify
public NOOPSDNotify()
-
-
Method Details
-
ready
public boolean ready()Description copied from interface:SDNotifyNotify systemd that the service has started successfully. This has to be sent for services of Type=notify to be considered running by systemd. -
status
Description copied from interface:SDNotifySend a free form status message to systemd. -
reloading
public boolean reloading()Description copied from interface:SDNotifyNotify systemd that the service is currently reloading.SDNotify.ready()must be called once this reloading has finished. -
stopping
public boolean stopping()Description copied from interface:SDNotifyNotify systemd that the service is stopping. -
errno
public boolean errno(int errno) Description copied from interface:SDNotifyNotify systemd that an error has occurred. -
busError
Description copied from interface:SDNotifyNotify systemd that a D-Bus error has occurred. -
mainPid
public boolean mainPid(int pid) Description copied from interface:SDNotifyInform systemd of the main pid of the service. This is only necessary under special circumstances. -
watchdog
public boolean watchdog()Description copied from interface:SDNotifyUpdate the watchdog timestamp for services with WatchDogSec enabled. -
watchdogTrigger
public boolean watchdogTrigger()Description copied from interface:SDNotifyAn error that should be handled by the watchdog options occured.- Specified by:
watchdogTriggerin interfaceSDNotify- Returns:
- if the message was successfully sent
-
extendTimeout
Description copied from interface:SDNotifyTells the service manager to extend the startup, runtime or shutdown service timeout corresponding the current state.- Specified by:
extendTimeoutin interfaceSDNotify- Parameters:
duration- the new value of the timeout- Returns:
- if the message was successfully sent
-