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

Class DMRequestHandler

  • java.lang.Object
    • com.ibm.wiotp.sdk.devicemgmt.internal.handler.DMRequestHandler
    • Constructor Detail

      • DMRequestHandler

        public DMRequestHandler()
    • Method Detail

      • getTopic

        protected abstract String getTopic()
      • handleRequest

        protected abstract void handleRequest(com.google.gson.JsonObject jsonRequest,
                                              String topic)
      • messageArrived

        public void messageArrived(String topic,
                                   org.eclipse.paho.client.mqttv3.MqttMessage message)
        Specified by:
        messageArrived in interface org.eclipse.paho.client.mqttv3.IMqttMessageListener
      • setDMClient

        protected void setDMClient(ManagedClient client)
      • respond

        protected void respond(com.google.gson.JsonObject payload)
      • notify

        protected void notify(com.google.gson.JsonObject payload)
      • setRequestHandlers

        public static void setRequestHandlers(ManagedClient dmClient)
                                       throws org.eclipse.paho.client.mqttv3.MqttException
        Create all the necessary request handlers - this is called when manage request is called by the agent Do a bulk subscribe to improve the performance
        Parameters:
        dmClient - The managedDevice client instance
        Throws:
        org.eclipse.paho.client.mqttv3.MqttException - when there is a failure in subscription
      • clearRequestHandlers

        public static void clearRequestHandlers(ManagedClient dmClient)
                                         throws org.eclipse.paho.client.mqttv3.MqttException
        Clear all the request handlers - this is called when unmanage request is called by the agent Do a bulk unsubscribe to improve performance
        Parameters:
        dmClient - The Managed device instance
        Throws:
        org.eclipse.paho.client.mqttv3.MqttException - failure in unsubscription

Copyright © 2019. All rights reserved.