@ThreadSafe public class BceHttpClient extends Object
| Constructor and Description |
|---|
BceHttpClient(BceClientConfiguration config,
Signer signer)
Constructs a new BCE client using the specified client configuration options (ex: max retry attempts, proxy
settings, etc), and request metric collector.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends AbstractBceResponse> |
execute(InternalRequest request,
Class<T> responseClass,
HttpResponseHandler[] responseHandlers)
Executes the request and returns the result.
|
protected void |
finalize() |
void |
shutdown()
Shuts down this HTTP client object, releasing any resources that might be held open.
|
public BceHttpClient(BceClientConfiguration config, Signer signer)
config - Configuration options specifying how this client will communicate with BCE (ex: proxy settings,
retry count, etc.).IllegalArgumentException - If config or signer is null.public <T extends AbstractBceResponse> T execute(InternalRequest request, Class<T> responseClass, HttpResponseHandler[] responseHandlers)
request - The BCE request to send to the remote serverresponseClass - A response handler to accept a successful response from the remote serverresponseHandlers - A response handler to accept an unsuccessful response from the remote serverBceClientException - If any errors are encountered on the client while making the
request or handling the response.BceServiceException - If any errors occurred in BCE while processing the request.public void shutdown()
Copyright © 2015. All rights reserved.