com.netease.cloud.http
public class NeteaseHttpClient extends Object
Constructor and Description |
---|
NeteaseHttpClient(ClientConfiguration clientConfiguration)
Constructs a new client using the specified client configuration options
(ex: max retry attempts, proxy settings, etc).
|
Modifier and Type | Method and Description |
---|---|
<T> T |
execute(Request<?> request,
HttpResponseHandler<WebServiceResponse<T>> responseHandler,
HttpResponseHandler<ServiceException> errorResponseHandler,
ExecutionContext executionContext)
Executes the request and returns the result.
|
protected void |
finalize() |
ResponseMetadata |
getResponseMetadataForRequest(WebServiceRequest request)
Returns additional response metadata for an executed request.
|
void |
shutdown()
Shuts down this HTTP client object, releasing any resources that might be
held open.
|
public NeteaseHttpClient(ClientConfiguration clientConfiguration)
clientConfiguration
- Configuration options specifying how this client will
communicate .public ResponseMetadata getResponseMetadataForRequest(WebServiceRequest request)
request
- A previously executed WebServiceRequest object, whose
response metadata is desired.public <T> T execute(Request<?> request, HttpResponseHandler<WebServiceResponse<T>> responseHandler, HttpResponseHandler<ServiceException> errorResponseHandler, ExecutionContext executionContext) throws ClientException, ServiceException
request
- The WebServices request to send to the remote serverresponseHandler
- A response handler to accept a successful response from the
remote servererrorResponseHandler
- A response handler to accept an unsuccessful response from the
remote serverexecutionContext
- Additional information about the context of this web service
callClientException
ServiceException
public void shutdown()
Copyright © 2017. All Rights Reserved.