Package com.diozero.util
Class Diozero
- java.lang.Object
-
- com.diozero.util.Diozero
-
public class Diozero extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
UNKNOWN_VALUE
-
Constructor Summary
Constructors Constructor Description Diozero()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getVersion()
static void
initialiseShutdownHook()
Initialise the diozero shutdown handler if not already initialised.static void
registerForShutdown(AutoCloseable... closeableArray)
Register an object to be explicitly closed in the case of abnormal shutdownstatic void
shutdown()
Shutdown diozero.static void
waitForShutdown()
-
-
-
Field Detail
-
UNKNOWN_VALUE
public static final int UNKNOWN_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getVersion
public static String getVersion()
-
initialiseShutdownHook
public static void initialiseShutdownHook()
Initialise the diozero shutdown handler if not already initialised. Called from DeviceFactoryHelper.initialise(). Application code should not invoke this method.
-
registerForShutdown
public static void registerForShutdown(AutoCloseable... closeableArray)
Register an object to be explicitly closed in the case of abnormal shutdown- Parameters:
closeableArray
- Array of closeable objects to close on shutdown
-
shutdown
public static void shutdown()
Shutdown diozero.
-
waitForShutdown
public static void waitForShutdown()
-
-