Package org.hive2hive.core.processes.implementations.common

Examples of org.hive2hive.core.processes.implementations.common.GetUserLocationsStep


    }
  }

  public static Locations getLocations(NetworkManager networkManager, String userId) throws NoPeerConnectionException {
    GetUserLocationsContext context = new GetUserLocationsContext();
    GetUserLocationsStep step = new GetUserLocationsStep(userId, context, networkManager.getDataManager());
    executeProcess(step);
    return context.locations;
  }
View Full Code Here


    // process composition
    SequentialProcess process = new SequentialProcess();

    process.add(new GetUserProfileStep(credentials, context, dataManager));
    process.add(new SessionCreationStep(params, context, networkManager));
    process.add(new GetUserLocationsStep(credentials.getUserId(), context, networkManager.getDataManager()));
    process.add(new ContactOtherClientsStep(context, networkManager));
    process.add(new PutUserLocationsStep(context, context, dataManager));
    process.add(new SynchronizeFilesStep(context, networkManager));

    return process;
View Full Code Here

    LogoutProcessContext context = new LogoutProcessContext(session);

    // process composition
    SequentialProcess process = new SequentialProcess();

    process.add(new GetUserLocationsStep(session.getCredentials().getUserId(), context, dataManager));
    process.add(new RemoveOwnLocationsStep(context, networkManager));
    process.add(new StopDownloadsStep(session.getDownloadManager()));
    process.add(new WritePersistentStep(session.getRoot(), session.getKeyManager(), session.getDownloadManager()));
    process.add(new DeleteSessionStep(networkManager));
View Full Code Here

  }

  @Override
  public boolean isRegistered(String userId) throws NoPeerConnectionException {
    IsRegisteredContext context = new IsRegisteredContext();
    IProcessComponent checkProcess = new GetUserLocationsStep(userId, context, networkManager.getDataManager());
    executeProcess(checkProcess);

    return context.isRegistered();
  }
View Full Code Here

  }

  private void initCleanupUnreachablePeers() {
    try {
      DataManager dataManager = networkManager.getDataManager();
      getParent().add(new GetUserLocationsStep(networkManager.getUserId(), context, dataManager));
      getParent().add(new RemoveUnreachableStep(context, unreachablePeers, networkManager));
    } catch (NoPeerConnectionException e) {
      logger.error("No connection to the network. Failed to cleanup unreachable peers");
    }
  }
View Full Code Here

  public void run() {
    ProvideUserLocationsContext context = new ProvideUserLocationsContext();

    SequentialProcess process = new SequentialProcess();
    for (String user : task.getUsers()) {
      GetUserLocationsStep step = new GetUserLocationsStep(user, context, dataManager);
      process.add(new AsyncComponent(step));
    }

    try {
      logger.debug("Started getting the list of locations to download {}", task.getDestinationName());
View Full Code Here

TOP

Related Classes of org.hive2hive.core.processes.implementations.common.GetUserLocationsStep

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.