diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/ControllerService.java b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/ControllerService.java index d71780ef..f6968246 100644 --- a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/ControllerService.java +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/ControllerService.java @@ -63,29 +63,6 @@ public interface ControllerService { @Consumes(MediaType.APPLICATION_JSON) 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 state change status of sensor: on/off diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/transport/MQTTConnector.java b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/transport/MQTTConnector.java index 5015cc18..495f9dc5 100644 --- a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/transport/MQTTConnector.java +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/transport/MQTTConnector.java @@ -55,7 +55,7 @@ public class MQTTConnector extends MQTTTransportHandler { private static final String publisherContext = "publisher"; 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 EMPTY_STRING = ""; private static final String JSON_SERIAL_KEY = "SerialNumber";