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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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