public class SAClient extends Object
| Constructor and Description |
|---|
SAClient(Collection<org.apache.http.HttpHost> hosts) |
SAClient(Collection<String> hosts,
int stdSvcPort) |
SAClient(LoadBalancingPolicy<URI,org.apache.http.HttpHost> loadBalancingPolicy) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.http.client.methods.CloseableHttpResponse |
getResponse(org.apache.http.client.methods.HttpUriRequest request)
Execute the given
request on a host selected by the loadBalancingPolicy. |
static org.apache.http.HttpHost |
hostForString(String host,
int stdSvcPort)
Return an HttpHost from an input string.
|
public SAClient(Collection<String> hosts, int stdSvcPort)
public SAClient(Collection<org.apache.http.HttpHost> hosts)
public SAClient(LoadBalancingPolicy<URI,org.apache.http.HttpHost> loadBalancingPolicy)
public org.apache.http.client.methods.CloseableHttpResponse getResponse(org.apache.http.client.methods.HttpUriRequest request)
throws SAClientException
request on a host selected by the loadBalancingPolicy.
Requests are retried until they succeed or the loadBalancingPolicy gives up trying
to find a suitable host.request - The HTTP request to be executedSAClientException - If there was a problem executing the requestpublic void close()
public static org.apache.http.HttpHost hostForString(String host, int stdSvcPort)
hosts - Copyright © 2018. All rights reserved.