public abstract class DMRequestHandler extends Object implements org.eclipse.paho.client.mqttv3.IMqttMessageListener
| Constructor and Description |
|---|
DMRequestHandler() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearRequestHandlers(ManagedClient dmClient)
Clear all the request handlers - this is called when unmanage request is
called by the agent
Do a bulk unsubscribe to improve performance
|
protected ManagedClient |
getDMClient() |
protected ObserveRequestHandler |
getObserveRequestHandler(ManagedClient dmClient) |
protected abstract String |
getTopic() |
protected abstract void |
handleRequest(com.google.gson.JsonObject jsonRequest,
String topic) |
void |
messageArrived(String topic,
org.eclipse.paho.client.mqttv3.MqttMessage message) |
protected void |
notify(com.google.gson.JsonObject payload) |
protected void |
respond(com.google.gson.JsonObject payload) |
protected void |
setDMClient(ManagedClient client) |
static void |
setRequestHandlers(ManagedClient dmClient)
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
|
protected abstract String getTopic()
protected abstract void handleRequest(com.google.gson.JsonObject jsonRequest,
String topic)
public void messageArrived(String topic, org.eclipse.paho.client.mqttv3.MqttMessage message)
messageArrived in interface org.eclipse.paho.client.mqttv3.IMqttMessageListenerprotected ManagedClient getDMClient()
protected void setDMClient(ManagedClient client)
protected ObserveRequestHandler getObserveRequestHandler(ManagedClient dmClient)
protected void respond(com.google.gson.JsonObject payload)
protected void notify(com.google.gson.JsonObject payload)
public static void setRequestHandlers(ManagedClient dmClient) throws org.eclipse.paho.client.mqttv3.MqttException
dmClient - The managedDevice client instanceorg.eclipse.paho.client.mqttv3.MqttException - when there is a failure in subscriptionpublic static void clearRequestHandlers(ManagedClient dmClient) throws org.eclipse.paho.client.mqttv3.MqttException
dmClient - The Managed device instanceorg.eclipse.paho.client.mqttv3.MqttException - failure in unsubscriptionCopyright © 2019. All rights reserved.