mobile/android/base/sync/delegates/NodeAssignmentCallback.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.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