mobile/android/base/sync/delegates/NodeAssignmentCallback.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.delegates;
     7 import java.net.URI;
     9 import org.mozilla.gecko.sync.GlobalSession;
    11 public interface NodeAssignmentCallback {
    12   /**
    13    * If true, request node assignment from the server, i.e., fetch node/weave cluster URL.
    14    */
    15   public boolean wantNodeAssignment();
    17   /**
    18    * Called when a new node is assigned. If there already was an old node, the
    19    * new node is different from the old node assignment, indicating node
    20    * reassignment. If there wasn't an old node, we've been freshly assigned.
    21    *
    22    * @param globalSession
    23    * @param oldClusterURL
    24    *          The old node/weave cluster URL (possibly null).
    25    * @param newClusterURL
    26    *          The new node/weave cluster URL (not null).
    27    */
    28   public void informNodeAssigned(GlobalSession globalSession, URI oldClusterURL, URI newClusterURL);
    30   /**
    31    * Called when wantNodeAssignment() is true, and the new node assignment is
    32    * the same as the old node assignment, indicating a user authentication
    33    * error.
    34    *
    35    * @param globalSession
    36    * @param failedClusterURL
    37    *          The new node/weave cluster URL.
    38    */
    39   public void informNodeAuthenticationFailed(GlobalSession globalSession, URI failedClusterURL);
    41   public String nodeWeaveURL();
    42 }

mercurial