}
private static SimplePushServerConfig parseSimplePushProperties(final JsonNode json) {
final JsonNode host = json.get("host");
final JsonNode port = json.get("port");
final Builder builder = DefaultSimplePushConfig.create(host.asText(), port.asInt());
final JsonNode password = json.get("password");
if (password != null) {
builder.password(password.asText());
}
final JsonNode useragentReaperTimeout = json.get("useragent-reaper-timeout");
if (useragentReaperTimeout != null) {
builder.userAgentReaperTimeout(useragentReaperTimeout.asLong());
}
final JsonNode endpointHost = json.get("endpoint-host");
if (endpointHost != null) {
builder.endpointHost(endpointHost.asText());
}
final JsonNode endpointPort = json.get("endpoint-port");
if (endpointPort != null) {
builder.endpointPort(endpointPort.asInt());
}
final JsonNode endpointTls = json.get("endpoint-tls");
if (endpointTls != null) {
builder.endpointTls(endpointTls.asBoolean());
}
final JsonNode endpointPrefix = json.get("endpoint-prefix");
if (endpointPrefix != null) {
builder.endpointPrefix(endpointPrefix.asText());
}
final JsonNode ackInterval = json.get("ack-interval");
if (ackInterval != null) {
builder.ackInterval(ackInterval.asLong());
}
final JsonNode notifierMaxThreads = json.get("notifier-max-threads");
if (notifierMaxThreads != null) {
builder.notifierMaxThreads(notifierMaxThreads.asInt());
}
return builder.build();
}