@Override public void fromJson(JsonObject json) { config = AliasedDiscoveryConfigUtils.newConfigFor(tag); JsonValue enabled = json.get("enabled"); if (enabled != null && !enabled.isNull()) { config.setEnabled(enabled.asBoolean()); } JsonValue usePublicIp = json.get("usePublicIp"); if (usePublicIp != null && !usePublicIp.isNull()) { config.setUsePublicIp(usePublicIp.asBoolean()); } Map<String, Comparable> properties = fromJsonObject((JsonObject) json.get("properties")); for (Entry<String, Comparable> property : properties.entrySet()) { config.setProperty(property.getKey(), (String) property.getValue()); } }
@Override public void fromJson(JsonObject json) { config = new DiscoveryStrategyConfig(); JsonValue className = json.get("className"); if (className != null && !className.isNull()) { config.setClassName(className.asString()); } config.setProperties(fromJsonObject((JsonObject) json.get("properties"))); }
@Override public void fromJson(JsonObject json) { config = new WanConsumerConfig(); JsonValue persistWanReplicatedData = json.get("persistWanReplicatedData"); if (persistWanReplicatedData != null && !persistWanReplicatedData.isNull()) { config.setPersistWanReplicatedData(persistWanReplicatedData.asBoolean()); } JsonValue className = json.get("className"); if (className != null && !className.isNull()) { config.setClassName(className.asString()); } config.setProperties(fromJsonObject((JsonObject) json.get("properties"))); }
config.setProperties(fromJsonObject((JsonObject) json.get("properties")));