For 2014 Spring and later models, main power of a machine can be shut down from an SDK/J application. This feature is available for both Xlet and server type applications. The following package contains the class:
jp.co.ricoh.dsdk.util
SysShutdownControl This class provides the feature to turn the machine power off. This is a new class added for SDK/J version 12.01.
Implementation Details
// Obtain instance of SysShutdownControl
SysShutdownControl ssc = SysShutdownControl.getInstance();
// Run power shutdown (normal power shutdown)
int resultCode = ssc.shutdown(SysShutdownControl.NORMAL_MODE);
// Run processes accordinly to the result of the request
switch (resultCode) {
case SysShutdownControl.ACCEPTED:
// Implementation for the case of “request accepted”
case SysShutdownControl.REJECTED_COMPULSIVE_AVAILABLE:
// Implementation for the case of “request refused (forced power shutdown available)
case SysShutdownControl.REJECTED_COMPULSIVE_UNAVAILABLE:
// Implementation for the case of “request refused (forced power shutdown unavailable)”
}
Check Availability with System Properties
Support status of power shutdown feature is defined in system properties. Availability of this feature for a target model can be determined by checking the system properties from an SDK/J application. [Key name]
dsdk.util.sysshutdown.support
Documentation
For more details please refer to the following documents: Xlet Type Developer's Guide (Xlet) and find the section "Power Shutdown Feature [SDK/J Version 12.01 or Later]".Tech Tip Classification