public class AsyncRequestWrapperImpl<R extends ODataResponse> extends AbstractRequest implements AsyncRequestWrapper<R>
| Modifier and Type | Class and Description |
|---|---|
class |
AsyncRequestWrapperImpl.AsyncResponseWrapperImpl |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.client.HttpClient |
httpClient
HTTP client.
|
protected static int |
MAX_RETRY |
protected ODataClient |
odataClient |
protected ODataRequest |
odataRequest
Request to be wrapped.
|
protected org.apache.http.client.methods.HttpUriRequest |
request
HTTP request.
|
protected URI |
uri
Target URI.
|
LOG| Modifier | Constructor and Description |
|---|---|
protected |
AsyncRequestWrapperImpl(ODataClient odataClient,
ODataRequest odataRequest) |
| Modifier and Type | Method and Description |
|---|---|
AsyncRequestWrapper<R> |
callback(URI url)
The odata.callback preference MUST include the parameter url whose value is the URL of a callback endpoint to be
invoked by the OData service when data is available.
|
protected org.apache.http.HttpResponse |
checkMonitor(URI location) |
protected org.apache.http.HttpResponse |
doExecute() |
AsyncResponseWrapper<R> |
execute()
execute the request for the first time.
|
protected org.apache.http.HttpResponse |
executeHttpRequest(org.apache.http.client.HttpClient client,
org.apache.http.client.methods.HttpUriRequest req) |
protected void |
extendHeader(String headerName,
String headerValue) |
AsyncRequestWrapper<R> |
wait(int waitInSeconds)
Add wait http header.
|
checkRequest, checkResponseprotected static final int MAX_RETRY
protected final ODataClient odataClient
protected final ODataRequest odataRequest
protected final org.apache.http.client.HttpClient httpClient
protected final org.apache.http.client.methods.HttpUriRequest request
protected final URI uri
protected AsyncRequestWrapperImpl(ODataClient odataClient, ODataRequest odataRequest)
public final AsyncRequestWrapper<R> wait(int waitInSeconds)
AsyncRequestWrapperwait in interface AsyncRequestWrapper<R extends ODataResponse>waitInSeconds - wait time in seconds.public final AsyncRequestWrapper<R> callback(URI url)
AsyncRequestWrappercallback in interface AsyncRequestWrapper<R extends ODataResponse>url - callback URLpublic AsyncResponseWrapper<R> execute()
AsyncRequestWrapperexecute in interface AsyncRequestWrapper<R extends ODataResponse>protected org.apache.http.HttpResponse doExecute()
protected final org.apache.http.HttpResponse checkMonitor(URI location)
protected final org.apache.http.HttpResponse executeHttpRequest(org.apache.http.client.HttpClient client,
org.apache.http.client.methods.HttpUriRequest req)
Copyright © 2023. All rights reserved.