public class RestRequest extends Object
Currently it only has one method for retrying http request execution so that the same logic doesn't have to be replicated at difference places where retry is needed.
| Constructor and Description |
|---|
RestRequest() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.http.HttpResponse |
execute(org.apache.http.client.HttpClient httpClient,
org.apache.http.client.methods.HttpRequestBase httpRequest,
long retryTimeout,
int injectSocketTimeout,
AtomicBoolean canceling)
Execute an http request with retry logic.
|
public static org.apache.http.HttpResponse execute(org.apache.http.client.HttpClient httpClient,
org.apache.http.client.methods.HttpRequestBase httpRequest,
long retryTimeout,
int injectSocketTimeout,
AtomicBoolean canceling)
throws IOException,
SnowflakeSQLException
httpClient - client object used to communicate with other machinehttpRequest - request object contains all the request informationretryTimeout - : retry timeout (in seconds)injectSocketTimeout - : simulate socket timeoutcanceling - canceling flagIOException - jave io exceptionSnowflakeSQLException - Request timeout Exception or Illegal State Exception i.e.
connection is already shutdown etcCopyright © 2017. All rights reserved.