Class ObjectRequest

    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectRequest​(Method method, java.lang.String path, java.lang.String subresource)  
      ObjectRequest​(ObjectRequest other)
      Constructs a duplicate of the specified object request.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addCustomHeader​(java.lang.String key, java.lang.Object value)  
      java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getCustomHeaders()  
      java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getHeaders()
      Override to return request-specific headers based on properties of the request.
      Method getMethod()  
      java.lang.String getNamespace()  
      java.lang.String getPath()  
      java.util.Map<java.lang.String,​java.lang.Object> getProperties()  
      java.util.Map<java.lang.String,​java.lang.String> getQueryParams()
      Override to return the request-specific query parameters based on properties of the request.
      java.lang.String getQueryString()
      Deprecated.
      (2.0.4) use getRawQueryString() instead
      java.lang.String getRawQueryString()  
      java.lang.String getSubresource()  
      void property​(java.lang.String name, java.lang.Object value)
      Pass request-specific properties to the HTTP client implementation that may affect processing/filters, etc.
      void setNamespace​(java.lang.String namespace)  
      protected void setPath​(java.lang.String path)  
      • Methods inherited from class java.lang.Object

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

      • ObjectRequest

        public ObjectRequest​(Method method,
                             java.lang.String path,
                             java.lang.String subresource)
        Parameters:
        method - the HTTP method to use for the request
        path - the context-relative path of the request (i.e. the object key/path). Be sure to exclude dynamic path properties such as bucket or namespace. Since this is context-relative, also exclude the base context of the service (i.e. /rest for Atmos).
        subresource - the subresource of the request. This will be the first parameter in the querystring and will not have an associated value (i.e. "acl" => ?acl).
      • ObjectRequest

        public ObjectRequest​(ObjectRequest other)
        Constructs a duplicate of the specified object request.
    • Method Detail

      • getQueryParams

        public java.util.Map<java.lang.String,​java.lang.String> getQueryParams()
        Override to return the request-specific query parameters based on properties of the request. Do NOT include the subresource in this map; it will be inserted automatically. Note this implementation uses a TreeSet, which will sort the parameters by name. This is done to make URLs consistent for testing and should not change the semantics of any request.
      • getHeaders

        public java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getHeaders()
        Override to return request-specific headers based on properties of the request. Always call super() first and modify the result.
      • addCustomHeader

        public void addCustomHeader​(java.lang.String key,
                                    java.lang.Object value)
      • getCustomHeaders

        public java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> getCustomHeaders()
      • getQueryString

        public final java.lang.String getQueryString()
        Deprecated.
        (2.0.4) use getRawQueryString() instead
      • getRawQueryString

        public final java.lang.String getRawQueryString()
      • getNamespace

        public java.lang.String getNamespace()
      • setNamespace

        public void setNamespace​(java.lang.String namespace)
      • getMethod

        public Method getMethod()
      • getPath

        public java.lang.String getPath()
      • setPath

        protected void setPath​(java.lang.String path)
      • getSubresource

        public java.lang.String getSubresource()
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getProperties()
      • property

        public void property​(java.lang.String name,
                             java.lang.Object value)
        Pass request-specific properties to the HTTP client implementation that may affect processing/filters, etc.