com.ibm.wiotp.sdk.devicemgmt.internal.handler

Class FirmwareDownloadRequestHandler

  • All Implemented Interfaces:
    org.eclipse.paho.client.mqttv3.IMqttMessageListener


    public class FirmwareDownloadRequestHandler
    extends DMRequestHandler
    Request handler for MMqttClient.SERVER_TOPIC_INITIATE_FIRMWARE_DOWNLOAD
    Expected request message format
    { "reqId": "string" }
    • Constructor Detail

      • FirmwareDownloadRequestHandler

        public FirmwareDownloadRequestHandler(ManagedClient dmClient)
    • Method Detail

      • handleRequest

        public void handleRequest(com.google.gson.JsonObject jsonRequest,
                                  String topic)
        Following are actions that needs to be taken after receiving the command If mgmt.firmware.state is not 0 ("Idle") an error should be reported with response code 400, and an optional message text. If the action can be initiated immediately, set rc to 202. If mgmt.firmware.url is not set or is not a valid URL, set rc to 400. If firmware download attempt fails, set rc to 500 and optionally set message accordingly. If firmware download is not supported, set rc to 501 and optionally set message accordingly.
        Specified by:
        handleRequest in class DMRequestHandler

Copyright © 2019. All rights reserved.