Class SyncMethod

  • All Implemented Interfaces:
    Cloneable, org.apache.http.client.methods.AbortableHttpRequest, org.apache.http.client.methods.Configurable, org.apache.http.client.methods.HttpExecutionAware, org.apache.http.client.methods.HttpUriRequest, org.apache.http.HttpEntityEnclosingRequest, org.apache.http.HttpMessage, org.apache.http.HttpRequest

    public class SyncMethod
    extends org.apache.jackrabbit.webdav.client.methods.BaseDavRequest
    Class to work with WebDAV-Sync Method defined in RFC 6578.
    See Also:
    for Request Report to be given as argument
    • Field Summary

      • Fields inherited from class org.apache.http.message.AbstractHttpMessage

        headergroup, params
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getMethod()
      Implements the Report Method.
      org.apache.jackrabbit.webdav.MultiStatus getResponseBodyAsMultiStatus​(org.apache.http.HttpResponse response)
      Adapted from DavMethodBase to handle MultiStatus responses.
      String getResponseSynctoken​(org.apache.http.HttpResponse response)  
      protected void processResponseBody​(org.apache.http.HttpResponse response)
      Process the sync-token, from the response.
      void reset()  
      void setDepth​(int depth)
      Set the Depth Header of the Sync Report.
      boolean succeeded​(org.apache.http.HttpResponse response)  
      • Methods inherited from class org.apache.jackrabbit.webdav.client.methods.BaseDavRequest

        checkSuccess, getResponseBodyAsDocument, getResponseBodyAsEventDiscovery, getResponseBodyAsLockDiscovery, getResponseBodyAsSubscriptionDiscovery, getResponseException
      • Methods inherited from class org.apache.http.client.methods.HttpEntityEnclosingRequestBase

        clone, expectContinue, getEntity, setEntity
      • Methods inherited from class org.apache.http.client.methods.HttpRequestBase

        getConfig, getProtocolVersion, getRequestLine, getURI, releaseConnection, setConfig, setProtocolVersion, setURI, started, toString
      • Methods inherited from class org.apache.http.client.methods.AbstractExecutionAwareRequest

        abort, completed, isAborted, setCancellable, setConnectionRequest, setReleaseTrigger
      • Methods inherited from class org.apache.http.message.AbstractHttpMessage

        addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
      • Methods inherited from interface org.apache.http.HttpMessage

        addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, getProtocolVersion, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
      • Methods inherited from interface org.apache.http.HttpRequest

        getRequestLine
      • Methods inherited from interface org.apache.http.client.methods.HttpUriRequest

        abort, isAborted
    • Method Detail

      • setDepth

        public void setDepth​(int depth)
        Set the Depth Header of the Sync Report.
        Parameters:
        depth - Depth of the Request
      • getMethod

        public String getMethod()
        Implements the Report Method.
        Specified by:
        getMethod in interface org.apache.http.client.methods.HttpUriRequest
        Specified by:
        getMethod in class org.apache.http.client.methods.HttpRequestBase
      • succeeded

        public boolean succeeded​(org.apache.http.HttpResponse response)
        Overrides:
        succeeded in class org.apache.jackrabbit.webdav.client.methods.BaseDavRequest
        Returns:
        Return true only when when Response is Multistatus.
        See Also:
        BaseDavRequest.succeeded(HttpResponse)
      • getResponseSynctoken

        public String getResponseSynctoken​(org.apache.http.HttpResponse response)
      • getResponseBodyAsMultiStatus

        public org.apache.jackrabbit.webdav.MultiStatus getResponseBodyAsMultiStatus​(org.apache.http.HttpResponse response)
                                                                              throws org.apache.jackrabbit.webdav.DavException
        Adapted from DavMethodBase to handle MultiStatus responses.
        Overrides:
        getResponseBodyAsMultiStatus in class org.apache.jackrabbit.webdav.client.methods.BaseDavRequest
        Parameters:
        response - HttpResponse to be converted to MultiStatus
        Returns:
        MultiStatus response
        Throws:
        org.apache.jackrabbit.webdav.DavException - if the response body could not be parsed
      • processResponseBody

        protected void processResponseBody​(org.apache.http.HttpResponse response)
        Process the sync-token, from the response.
      • reset

        public void reset()
        Overrides:
        reset in class org.apache.http.client.methods.AbstractExecutionAwareRequest