public class GatewayConfigUtils extends Object
Modifier and Type | Method and Description |
---|---|
static List<String> |
normalizeHosts(List<String> hosts,
boolean ssl)
Get a list of hosts and normalize them with the proper scheme
|
static org.apache.http.HttpHost[] |
parseHosts(List<String> hosts)
Parse a list of hosts matching { 'server1:8080', 'server2:8181' } format to a HttpHosts array
Preserve the order
|
public static org.apache.http.HttpHost[] parseHosts(List<String> hosts)
hosts
- List of hosts with format { 'server1:8080', 'server2:8181' }public static List<String> normalizeHosts(List<String> hosts, boolean ssl)
hosts
- list of string hosts such as ('http://192.168.0.1:9200', 'localhost:9001')ssl
- if true, apply https schemeCopyright © 2023. All rights reserved.