-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Markus Enax edited this page Sep 8, 2016
·
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. At the time of writing no pre-built JAR is available in the usual spaces yet (e.g. central repository) hence you have to build and install it manually in your local repository. A Maven compatible fork is available here.
Maven is used as the primary build system.
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 v2.1 - just like dbus-java.