public class RuntimeControl extends Object
Modifier and Type | Method and Description |
---|---|
static void |
configureAppWatchdog(int minutes)
Configure or disable the application watchdog.
The application is checking that the refreshWatchdog() function
is called at least every minutes , in case the refresh function
is not called within the programmed maximum time, the eWON will reboot with
a critical error.REM: when this function is called, the watchdog timer is reset. |
static void |
configureNextRunCommand(String runCommand)
This function is used to schedule a new JVM execution.
|
static int |
getAutoCloseJAR()
Returns the current AutoCloseJAR value.
|
static void |
reboot()
This function will reboot the system immediately.
|
static void |
refreshWatchdog()
This function must be called at regular interval if the
configureAppWatchdog function
has been called with a value not equal to 0. |
static void |
setAutoCloseJAR(int autoCloseOn)
Setting AutoCloseJAR change the JVM behaviour regarding JAR files in the classpath
When a JAR file is in the classpath, the file is opened when the JVM starts and it
remains open as long as the JVP is running.
|
static void |
shutdown()
This function will perform a shutdown of the device, followed by a reboot.
|
public static void setAutoCloseJAR(int autoCloseOn)
autoCloseOn
- 0 or 1 according to the value required for AutoCloseJAR.public static int getAutoCloseJAR()
setAutoCloseJAR(int)
public static void configureNextRunCommand(String runCommand)
//Program next execution RTC.configureNextRunCommand("-heapsize 1M -classpath /usr/TestEwonJDK.jar -emain TestMain"); //Cancel next execution RTC.configureNextRunCommand(null);
runCommand
- The complete JVM run command line for next scheduled JVM execution.null
the next execution is CANCELED.public static void configureAppWatchdog(int minutes)
refreshWatchdog()
function
is called at least every minutes
, in case the refresh function
is not called within the programmed maximum time, the eWON will reboot with
a critical error.REM: the watchdog can be enabled at JVM start time using JVM command line paramters.
minutes
- Maxmimum number of minutes between 2 calls to the refreshWatchdog()
function.
If 0 then the watchdog is disabled.public static void refreshWatchdog()
configureAppWatchdog
function
has been called with a value not equal to 0. If the function is not called within the given interval, the
eWON will reboot.public static void reboot()
public static void shutdown()