Merge pull request #131 from GPrathap/master

corrected mqtt subscription topic format
application-manager-new
Ruwan 9 years ago
commit 74fb683383

@ -63,29 +63,6 @@ public interface ControllerService {
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
Response registerDevice(final DeviceJSON agentInfo); Response registerDevice(final DeviceJSON agentInfo);
/**
* @param deviceId unique identifier for given device type
* @param response
* @return
*/
/*@Path("device/{deviceId}/read-current-status")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Feature(code = "read-current-status", name = "Read current status of sensor On or Off", type = "monitor",
description = "Request current status of sensor from device")
public Response readCurrentStatus(@PathParam("deviceId") String deviceId,
@Context HttpServletResponse response);*/
/**
* @param agentInfo receive current status of sensor and device metadata
* @param response
*/
/*@Path("controller/push-sensor-value")
@POST
@Consumes(MediaType.APPLICATION_JSON)
public void pushData(final DeviceJSON agentInfo, @Context HttpServletResponse response) ;*/
/** /**
* @param deviceId unique identifier for given device type * @param deviceId unique identifier for given device type
* @param state change status of sensor: on/off * @param state change status of sensor: on/off

@ -55,7 +55,7 @@ public class MQTTConnector extends MQTTTransportHandler {
private static final String publisherContext = "publisher"; private static final String publisherContext = "publisher";
private static final String subscriberContext = "subscriber"; private static final String subscriberContext = "subscriber";
private static final String subscribeTopic = "wso2/" + DeviceTypeConstants.DEVICE_TYPE + "/+/" + publisherContext; private static final String subscribeTopic = "wso2/+/"+ DeviceTypeConstants.DEVICE_TYPE + "/+/" + publisherContext;
private static final String KEY_TYPE = "PRODUCTION"; private static final String KEY_TYPE = "PRODUCTION";
private static final String EMPTY_STRING = ""; private static final String EMPTY_STRING = "";
private static final String JSON_SERIAL_KEY = "SerialNumber"; private static final String JSON_SERIAL_KEY = "SerialNumber";

Loading…
Cancel
Save