Class AsyncRequestWrapperImpl.AsyncResponseWrapperImpl
java.lang.Object
org.apache.olingo.client.core.communication.request.AsyncRequestWrapperImpl.AsyncResponseWrapperImpl
- All Implemented Interfaces:
AsyncResponseWrapper<R>
- Direct Known Subclasses:
AsyncBatchRequestWrapperImpl.AsyncResponseWrapperImpl
- Enclosing class:
- AsyncRequestWrapperImpl<R extends ODataResponse>
public class AsyncRequestWrapperImpl.AsyncResponseWrapperImpl
extends Object
implements AsyncResponseWrapper<R>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA client can request that the DELETE should be executed asynchronously.delete()DeleteA DELETE request sent to the status monitor resource requests that the asynchronous processing be canceled.forceNextMonitorCheck(URI uri) Specifies the location for the next monitor check.Gets the real response.booleanisDone()Checks if asynchronous processing has been terminated.booleanChecks for preference applied.
-
Field Details
-
location
-
response
-
retryAfter
protected int retryAfter -
preferenceApplied
protected boolean preferenceApplied
-
-
Constructor Details
-
AsyncResponseWrapperImpl
public AsyncResponseWrapperImpl() -
AsyncResponseWrapperImpl
public AsyncResponseWrapperImpl(org.apache.http.HttpResponse res) Constructor.- Parameters:
res- HTTP response.
-
-
Method Details
-
isPreferenceApplied
public boolean isPreferenceApplied()Description copied from interface:AsyncResponseWrapperChecks for preference applied.- Specified by:
isPreferenceAppliedin interfaceAsyncResponseWrapper<R extends ODataResponse>- Returns:
- 'TRUE' if respond-async preference has been applied; 'FALSE' otherwise.
-
isDone
public boolean isDone()Description copied from interface:AsyncResponseWrapperChecks if asynchronous processing has been terminated.- Specified by:
isDonein interfaceAsyncResponseWrapper<R extends ODataResponse>- Returns:
- 'TRUE' the process has been terminated; 'FALSE' otherwise.
-
getODataResponse
Description copied from interface:AsyncResponseWrapperGets the real response.
If asynchronous processing has been terminated then the response will be returned immediately. This method retries after a delay, specified by the 'Retry-After' header indicating the time, in seconds, the client should wait before retry. If there isn't any 'Retry-After' response header available, a default of 5 seconds will be chosen. The query will be retried for a maximum of five times.- Specified by:
getODataResponsein interfaceAsyncResponseWrapper<R extends ODataResponse>- Returns:
- real OData response.
-
delete
Description copied from interface:AsyncResponseWrapperDeleteA DELETE request sent to the status monitor resource requests that the asynchronous processing be canceled. A 200 OK or to a 204 No Content response indicates that the asynchronous processing has been successfully canceled.- Specified by:
deletein interfaceAsyncResponseWrapper<R extends ODataResponse>- Returns:
- OData delete response.
-
asyncDelete
Description copied from interface:AsyncResponseWrapperA client can request that the DELETE should be executed asynchronously. A 202 Accepted response indicates that the cancellation is being processed asynchronously; the client can use the returned Location header (which MUST be different from the status monitor resource of the initial request) to query for the status of the cancellation. If a delete request is not supported by the service, the service returns 405 Method Not Allowed.- Specified by:
asyncDeletein interfaceAsyncResponseWrapper<R extends ODataResponse>- Returns:
- OData delete response.
-
forceNextMonitorCheck
Description copied from interface:AsyncResponseWrapperSpecifies the location for the next monitor check.
Overrides the location value retrieved among headers and nullifies the previous valid response (if exists).- Specified by:
forceNextMonitorCheckin interfaceAsyncResponseWrapper<R extends ODataResponse>- Parameters:
uri- monitor location.- Returns:
- the current async response wrapper.
-