Commit 550af81f9c6eb93df6515412ec6dc9907921f2f9

Authored by ShvaykaD
1 parent ec057511

updated variable name in the TopicType enum: change Request to Response

@@ -965,7 +965,7 @@ public class MqttTransportHandler extends ChannelInboundHandlerAdapter implement @@ -965,7 +965,7 @@ public class MqttTransportHandler extends ChannelInboundHandlerAdapter implement
965 @Override 965 @Override
966 public void onGetAttributesResponse(TransportProtos.GetAttributeResponseMsg response) { 966 public void onGetAttributesResponse(TransportProtos.GetAttributeResponseMsg response) {
967 log.trace("[{}] Received get attributes response", sessionId); 967 log.trace("[{}] Received get attributes response", sessionId);
968 - String topicBase = attrReqTopicType.getAttributesRequestTopicBase(); 968 + String topicBase = attrReqTopicType.getAttributesResponseTopicBase();
969 MqttTransportAdaptor adaptor = deviceSessionCtx.getAdaptor(attrReqTopicType); 969 MqttTransportAdaptor adaptor = deviceSessionCtx.getAdaptor(attrReqTopicType);
970 try { 970 try {
971 adaptor.convertToPublish(deviceSessionCtx, response, topicBase).ifPresent(deviceSessionCtx.getChannel()::writeAndFlush); 971 adaptor.convertToPublish(deviceSessionCtx, response, topicBase).ifPresent(deviceSessionCtx.getChannel()::writeAndFlush);
@@ -26,7 +26,7 @@ public enum TopicType { @@ -26,7 +26,7 @@ public enum TopicType {
26 V2_PROTO(MqttTopics.DEVICE_ATTRIBUTES_RESPONSE_SHORT_PROTO_TOPIC_PREFIX, MqttTopics.DEVICE_ATTRIBUTES_SHORT_PROTO_TOPIC, MqttTopics.DEVICE_RPC_REQUESTS_SHORT_PROTO_TOPIC, MqttTopics.DEVICE_RPC_RESPONSE_SHORT_PROTO_TOPIC); 26 V2_PROTO(MqttTopics.DEVICE_ATTRIBUTES_RESPONSE_SHORT_PROTO_TOPIC_PREFIX, MqttTopics.DEVICE_ATTRIBUTES_SHORT_PROTO_TOPIC, MqttTopics.DEVICE_RPC_REQUESTS_SHORT_PROTO_TOPIC, MqttTopics.DEVICE_RPC_RESPONSE_SHORT_PROTO_TOPIC);
27 27
28 @Getter 28 @Getter
29 - private final String attributesRequestTopicBase; 29 + private final String attributesResponseTopicBase;
30 30
31 @Getter 31 @Getter
32 private final String attributesSubTopic; 32 private final String attributesSubTopic;
@@ -38,7 +38,7 @@ public enum TopicType { @@ -38,7 +38,7 @@ public enum TopicType {
38 private final String rpcResponseTopicBase; 38 private final String rpcResponseTopicBase;
39 39
40 TopicType(String attributesRequestTopicBase, String attributesSubTopic, String rpcRequestTopicBase, String rpcResponseTopicBase) { 40 TopicType(String attributesRequestTopicBase, String attributesSubTopic, String rpcRequestTopicBase, String rpcResponseTopicBase) {
41 - this.attributesRequestTopicBase = attributesRequestTopicBase; 41 + this.attributesResponseTopicBase = attributesRequestTopicBase;
42 this.attributesSubTopic = attributesSubTopic; 42 this.attributesSubTopic = attributesSubTopic;
43 this.rpcRequestTopicBase = rpcRequestTopicBase; 43 this.rpcRequestTopicBase = rpcRequestTopicBase;
44 this.rpcResponseTopicBase = rpcResponseTopicBase; 44 this.rpcResponseTopicBase = rpcResponseTopicBase;