Class ResWrap<T>

java.lang.Object
org.apache.olingo.client.api.data.ResWrap<T>
Type Parameters:
T - the actual response payload

public class ResWrap<T> extends Object
Outermost response payload wrapper.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResWrap(URI contextURL, String metadataETag, T payload)
    Creates a new response payload wrapper
  • Method Summary

    Modifier and Type
    Method
    Description
    The context URL describes the content of the payload.
    An ETag header MAY also be returned on a metadata document request or service document request to allow the client subsequently to make a conditional request for the metadata or service document.
    Gets contained object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ResWrap

      public ResWrap(URI contextURL, String metadataETag, T payload)
      Creates a new response payload wrapper
      Parameters:
      contextURL - Context URI of the response
      metadataETag - ETag of the payload
      payload - Payload of the response
  • Method Details

    • getContextURL

      public URI getContextURL()
      The context URL describes the content of the payload. It consists of the canonical metadata document URL and a fragment identifying the relevant portion of the metadata document.
      Request payloads generally do not require context URLs as the type of the payload can generally be determined from the request URL.
      For details on how the context URL is used to describe a payload, see the relevant sections in the particular format.
      Returns:
      context URL.
    • getMetadataETag

      public String getMetadataETag()
      An ETag header MAY also be returned on a metadata document request or service document request to allow the client subsequently to make a conditional request for the metadata or service document. Clients can also compare the value of the ETag header returned from a metadata document request to the metadata ETag returned in a response in order to verify the version of the metadata used to generate that response.
      Returns:
      metadata ETag.
    • getPayload

      public T getPayload()
      Gets contained object.
      Returns:
      contained object.