Class AsyncRequestWrapperImpl<R extends ODataResponse>
java.lang.Object
org.apache.olingo.client.core.communication.request.AbstractRequest
org.apache.olingo.client.core.communication.request.AsyncRequestWrapperImpl<R>
- All Implemented Interfaces:
AsyncRequestWrapper<R>
- Direct Known Subclasses:
AsyncBatchRequestWrapperImpl
public class AsyncRequestWrapperImpl<R extends ODataResponse>
extends AbstractRequest
implements AsyncRequestWrapper<R>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.http.client.HttpClientHTTP client.protected static final intprotected final ODataClientprotected final ODataRequestRequest to be wrapped.protected final org.apache.http.client.methods.HttpUriRequestHTTP request.protected final URITarget URI.Fields inherited from class org.apache.olingo.client.core.communication.request.AbstractRequest
LOG -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAsyncRequestWrapperImpl(ODataClient odataClient, ODataRequest odataRequest) -
Method Summary
Modifier and TypeMethodDescriptionfinal AsyncRequestWrapper<R>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 final org.apache.http.HttpResponsecheckMonitor(URI location) protected org.apache.http.HttpResponseexecute()execute the request for the first time.protected final org.apache.http.HttpResponseexecuteHttpRequest(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpUriRequest req) protected final voidextendHeader(String headerName, String headerValue) final AsyncRequestWrapper<R>wait(int waitInSeconds) Add wait http header.Methods inherited from class org.apache.olingo.client.core.communication.request.AbstractRequest
checkRequest, checkResponse
-
Field Details
-
MAX_RETRY
protected static final int MAX_RETRY- See Also:
-
odataClient
-
odataRequest
Request to be wrapped. -
httpClient
protected final org.apache.http.client.HttpClient httpClientHTTP client. -
request
protected final org.apache.http.client.methods.HttpUriRequest requestHTTP request. -
uri
Target URI.
-
-
Constructor Details
-
AsyncRequestWrapperImpl
-
-
Method Details
-
wait
Description copied from interface:AsyncRequestWrapperAdd wait http header.- Specified by:
waitin interfaceAsyncRequestWrapper<R extends ODataResponse>- Parameters:
waitInSeconds- wait time in seconds.- Returns:
- the current AsyncRequestWrapper instance.
-
callback
Description copied from interface:AsyncRequestWrapperThe 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. The syntax of the odata.callback preference is specified in [OData-ABNF].
For HTTP based callbacks, the OData service executes an HTTP GET request against the specified URL.
Services that support odata.callback SHOULD support notifying the client through HTTP.- Specified by:
callbackin interfaceAsyncRequestWrapper<R extends ODataResponse>- Parameters:
url- callback URL- Returns:
- the current AsyncRequestWrapper instance.
-
extendHeader
-
execute
Description copied from interface:AsyncRequestWrapperexecute the request for the first time.- Specified by:
executein interfaceAsyncRequestWrapper<R extends ODataResponse>- Returns:
- the current AsyncRequestWrapper instance.
-
doExecute
protected org.apache.http.HttpResponse doExecute() -
checkMonitor
-
executeHttpRequest
protected final org.apache.http.HttpResponse executeHttpRequest(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpUriRequest req)
-