JsonObject transportAddress = jsonArray.get(i);
String hostname = transportAddress.getString(CONFIG_HOSTNAME);
if (hostname != null && !hostname.isEmpty()) {
int port = transportAddress.getInteger(CONFIG_PORT, 9300);
transportAddresses.add(new InetSocketTransportAddress(hostname, port));
}
}
}
// If no addresses are configured, add local host on the default port
if (transportAddresses.size() == 0) {
transportAddresses.add(new InetSocketTransportAddress("localhost", 9300));
}
}