Class Systemd

java.lang.Object
de.thjom.java.systemd.Systemd

public final class Systemd extends Object
  • Field Details

    • SERVICE_NAME

      public static final String SERVICE_NAME
      See Also:
    • OBJECT_PATH

      public static final String OBJECT_PATH
      See Also:
    • PATH_ESCAPE_PATTERN

      public static final Pattern PATH_ESCAPE_PATTERN
    • DEFAULT_THREAD_POOL_SIZE

      public static final byte DEFAULT_THREAD_POOL_SIZE
      See Also:
    • LOG

      private static final org.slf4j.Logger LOG
    • INSTANCES

      private static final Systemd[] INSTANCES
    • instanceType

      private final Systemd.InstanceType instanceType
    • dbus

      private org.freedesktop.dbus.connections.impl.DBusConnection dbus
    • manager

      private Manager manager
  • Constructor Details

  • Method Details

    • escapePath

      public static String escapePath(CharSequence path)
    • timestampToInstant

      public static Instant timestampToInstant(long timestamp)
    • usecsToDuration

      public static Duration usecsToDuration(long usecs)
    • id128ToString

      public static String id128ToString(byte[] id128)
    • get

      public static Systemd get() throws org.freedesktop.dbus.exceptions.DBusException
      Throws:
      org.freedesktop.dbus.exceptions.DBusException
    • get

      public static Systemd get(Systemd.InstanceType instanceType) throws org.freedesktop.dbus.exceptions.DBusException
      Throws:
      org.freedesktop.dbus.exceptions.DBusException
    • disconnect

      public static void disconnect()
    • disconnect

      public static void disconnect(Systemd.InstanceType instanceType)
    • disconnectAll

      public static void disconnectAll()
    • open

      private void open() throws org.freedesktop.dbus.exceptions.DBusException
      Throws:
      org.freedesktop.dbus.exceptions.DBusException
    • close

      private void close()
    • isConnected

      public boolean isConnected()
    • getConnection

      Optional<org.freedesktop.dbus.connections.impl.DBusConnection> getConnection()
    • getManager

      public Manager getManager() throws org.freedesktop.dbus.exceptions.DBusException
      Throws:
      org.freedesktop.dbus.exceptions.DBusException