com.ibm.wiotp.sdk.devicemgmt

Class DeviceActionHandler

    • Constructor Detail

      • DeviceActionHandler

        public DeviceActionHandler()
    • Method Detail

      • handleReboot

        public abstract void handleReboot(DeviceAction action)
        Subclass must implement this method.

        If the device supports reboot, subclass must add logic to reboot the device.

        If reboot attempt fails, the "rc" is set to 500 and the "message" field should be set accordingly, if the reboot is not supported, set "rc" to 501 and optionally set "message" accordingly

        Gateway must use the class DeviceAction to retrieve the DeviceType and DeviceId for which the reboot request is received and act accordingly.

        Parameters:
        action - DeviceAction where the device code can set the failure status and message
        See Also:
        DeviceAction
      • handleFactoryReset

        public abstract void handleFactoryReset(DeviceAction action)
        Subclass must implement this method.

        If the device supports factory reset, subclass must add logic to reset the device to factory settings

        If the factory reset attempt fails, the "rc" should be 500 and the "message" field should be set accordingly, if the factory reset action is not supported, set "rc" to 501 and optionally set "message" accordingly.

        Gateway must use the class DeviceAction to retrieve the DeviceType and DeviceId for which the Factory reset request is received and act accordingly.

        Parameters:
        action - DeviceAction where the device code can set the failure status and message
        See Also:
        DeviceAction

Copyright © 2019. All rights reserved.