mobile/android/base/sync/net/SyncStorageRequestDelegate.java

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 package org.mozilla.gecko.sync.net;
     7 public interface SyncStorageRequestDelegate {
     8   public AuthHeaderProvider getAuthHeaderProvider();
    10   String ifUnmodifiedSince();
    12   // TODO: at this point we can access X-Weave-Timestamp, compare
    13   // that to our local timestamp, and compute an estimate of clock
    14   // skew. Bug 721887.
    16   /**
    17    * Override this to handle a successful SyncStorageRequest.
    18    *
    19    * SyncStorageResourceDelegate implementers <b>must</b> ensure that the HTTP
    20    * responses underlying SyncStorageResponses are fully consumed to ensure that
    21    * connections are returned to the pool, for example by calling
    22    * <code>BaseResource.consumeEntity(response)</code>.
    23    */
    24   void handleRequestSuccess(SyncStorageResponse response);
    26   /**
    27    * Override this to handle a failed SyncStorageRequest.
    28    *
    29    *
    30    * SyncStorageResourceDelegate implementers <b>must</b> ensure that the HTTP
    31    * responses underlying SyncStorageResponses are fully consumed to ensure that
    32    * connections are returned to the pool, for example by calling
    33    * <code>BaseResource.consumeEntity(response)</code>.
    34    */
    35   void handleRequestFailure(SyncStorageResponse response);
    37   void handleRequestError(Exception ex);
    38 }

mercurial