Package org.hive2hive.core.api.interfaces

Examples of org.hive2hive.core.api.interfaces.IUserManager


  }

  private boolean register() throws NoPeerConnectionException, InvalidProcessStateException,
      InterruptedException {

    IUserManager userManager = menus.getNodeMenu().getNode().getUserManager();
    UserCredentials userCredentials = menus.getUserMenu().getUserCredentials();

    if (userManager.isRegistered(userCredentials.getUserId())) {
      return true;
    } else {
      H2HConsoleMenuItem
          .printPrecondition("You are not registered to the network. This will now happen automatically.");
      IProcessComponent registerProcess = userManager.register(userCredentials);
      return executeBlocking(registerProcess, "Register");
    }
  }
View Full Code Here


      boolean isRegistered = network.get(i).getUserManager().isRegistered(userId);
      assertFalse(isRegistered);
    }

    // registering from random node (await)
    IUserManager userManager = network.get(new Random().nextInt(network.size())).getUserManager();
    userManager.configureAutostart(true);
    userManager.register(userCredentials).await();

    // all nodes must have same result: true
    for (int i = 0; i < network.size(); i++) {
      boolean isRegistered = network.get(i).getUserManager().isRegistered(userId);
      assertTrue(isRegistered);
View Full Code Here

TOP

Related Classes of org.hive2hive.core.api.interfaces.IUserManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.