public static void toJson(MqttClientOptions obj, java.util.Map<String, Object> json) { json.put("autoGeneratedClientId", obj.isAutoGeneratedClientId()); json.put("autoKeepAlive", obj.isAutoKeepAlive()); json.put("cleanSession", obj.isCleanSession()); if (obj.getClientId() != null) { json.put("clientId", obj.getClientId()); } json.put("keepAliveTimeSeconds", obj.getKeepAliveTimeSeconds()); json.put("maxInflightQueue", obj.getMaxInflightQueue()); json.put("maxMessageSize", obj.getMaxMessageSize()); if (obj.getPassword() != null) { json.put("password", obj.getPassword()); } if (obj.getUsername() != null) { json.put("username", obj.getUsername()); } json.put("willFlag", obj.isWillFlag()); if (obj.getWillMessage() != null) { json.put("willMessage", obj.getWillMessage()); } json.put("willQoS", obj.getWillQoS()); json.put("willRetain", obj.isWillRetain()); if (obj.getWillTopic() != null) { json.put("willTopic", obj.getWillTopic()); } } }
public static void toJson(MqttClientOptions obj, java.util.Map<String, Object> json) { json.put("autoGeneratedClientId", obj.isAutoGeneratedClientId()); json.put("autoKeepAlive", obj.isAutoKeepAlive()); json.put("cleanSession", obj.isCleanSession()); if (obj.getClientId() != null) { json.put("clientId", obj.getClientId()); } json.put("keepAliveTimeSeconds", obj.getKeepAliveTimeSeconds()); json.put("maxInflightQueue", obj.getMaxInflightQueue()); json.put("maxMessageSize", obj.getMaxMessageSize()); if (obj.getPassword() != null) { json.put("password", obj.getPassword()); } if (obj.getUsername() != null) { json.put("username", obj.getUsername()); } json.put("willFlag", obj.isWillFlag()); if (obj.getWillMessage() != null) { json.put("willMessage", obj.getWillMessage()); } json.put("willQoS", obj.getWillQoS()); json.put("willRetain", obj.isWillRetain()); if (obj.getWillTopic() != null) { json.put("willTopic", obj.getWillTopic()); } } }
MqttPublishVariableHeader variableHeader; synchronized (this) { if (countInflightQueue >= options.getMaxInflightQueue()) { String msg = String.format("Attempt to exceed the limit of %d inflight messages", options.getMaxInflightQueue()); log.error(msg); MqttException exception = new MqttException(MqttException.MQTT_INFLIGHT_QUEUE_FULL, msg);
MqttPublishVariableHeader variableHeader; synchronized (this) { if (countInflightQueue >= options.getMaxInflightQueue()) { String msg = String.format("Attempt to exceed the limit of %d inflight messages", options.getMaxInflightQueue()); log.error(msg); MqttException exception = new MqttException(MqttException.MQTT_INFLIGHT_QUEUE_FULL, msg);