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>
  • Field Details

    • MAX_RETRY

      protected static final int MAX_RETRY
      See Also:
    • odataClient

      protected final ODataClient odataClient
    • odataRequest

      protected final ODataRequest odataRequest
      Request to be wrapped.
    • httpClient

      protected final org.apache.http.client.HttpClient httpClient
      HTTP client.
    • request

      protected final org.apache.http.client.methods.HttpUriRequest request
      HTTP request.
    • uri

      protected final URI uri
      Target URI.
  • Constructor Details

  • Method Details

    • wait

      public final AsyncRequestWrapper<R> wait(int waitInSeconds)
      Description copied from interface: AsyncRequestWrapper
      Add wait http header.
      Specified by:
      wait in interface AsyncRequestWrapper<R extends ODataResponse>
      Parameters:
      waitInSeconds - wait time in seconds.
      Returns:
      the current AsyncRequestWrapper instance.
    • callback

      public final AsyncRequestWrapper<R> callback(URI url)
      Description copied from interface: AsyncRequestWrapper
      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. 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:
      callback in interface AsyncRequestWrapper<R extends ODataResponse>
      Parameters:
      url - callback URL
      Returns:
      the current AsyncRequestWrapper instance.
    • extendHeader

      protected final void extendHeader(String headerName, String headerValue)
    • execute

      public AsyncResponseWrapper<R> execute()
      Description copied from interface: AsyncRequestWrapper
      execute the request for the first time.
      Specified by:
      execute in interface AsyncRequestWrapper<R extends ODataResponse>
      Returns:
      the current AsyncRequestWrapper instance.
    • doExecute

      protected org.apache.http.HttpResponse doExecute()
    • checkMonitor

      protected final org.apache.http.HttpResponse checkMonitor(URI location)
    • executeHttpRequest

      protected final org.apache.http.HttpResponse executeHttpRequest(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpUriRequest req)