-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Markus Enax edited this page Mar 14, 2021
·
18 revisions
This Java library provides access to systemd via D-Bus. It features:
- Simultaneous connectivity to the system bus and the session bus of the Java process owner
- Access to the particular instance-wide 'Manager' interface, including
- Method calls (ListUnits, StartUnit, StopUnit, RestartUnit, etc.)
- Property access (Environment, SystemState, KernelTimestamp, etc.)
- Convenience methods for instantiation of unit wrappers (see next bullet)
- Access to methods and properties of the 'Unit' interface and all derived interfaces, like
- Device
- Mount
- Service
- Target
- ...
- Encapsulation of complex properties into objects with meaningful fields
- Utility methods (timestamp conversion, path escaping, etc.)
dbus-java is required for this library to work. It is available on the central repository.
Maven is used as the primary build system. The code is based on OpenJDK 11.
Unit tests are based on TestNG and Mockito. Test methods which require a deployed systemd environment are grouped in TestNG group "requireSystemd". There are two TestNG suites available:
- src/test/resources/suites/auto-systemd.xml (executes all tests)
- src/test/resources/suites/auto.xml (excludes group "requireSystemd")
Use "auto.xml" for platform independent build systems.
LGPL v2 and AFL v3.0.