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

Examples of org.hive2hive.core.processes.implementations.common.userprofiletask.GetUserProfileTaskStep


  }

  public ProcessComponent createUserProfileTaskStep(NetworkManager networkManager) {
    SequentialProcess process = new SequentialProcess();
    UserProfileTaskContext context = new UserProfileTaskContext();
    process.add(new GetUserProfileTaskStep(context, networkManager));
    // Note: this step will add the next steps since it depends on the get result
    process.add(new HandleUserProfileTaskStep(context, networkManager));

    return process;
  }
View Full Code Here


    SimpleGetUserProfileTaskContext context = new SimpleGetUserProfileTaskContext();

    SequentialProcess process = new SequentialProcess();
    process.add(new TestPutUserProfileTaskStep(userId, userProfileTask, key.getPublic(), node));
    process.add(new GetUserProfileTaskStep(context, node));

    UseCaseTestUtil.executeProcess(process);

    assertNotNull(context.consumeUserProfileTask());
    assertEquals(userProfileTask.getId(), ((TestUserProfileTask) context.consumeUserProfileTask()).getId());
View Full Code Here

    SimpleGetUserProfileTaskContext context = new SimpleGetUserProfileTaskContext();

    SequentialProcess process = new SequentialProcess();
    process.add(new TestPutUserProfileTaskStep(userId, userProfileTask, key.getPublic(), node));
    process.add(new GetUserProfileTaskStep(context, node));

    UseCaseTestUtil.executeProcess(process);
  }
View Full Code Here

    SimpleGetUserProfileTaskContext context = new SimpleGetUserProfileTaskContext();

    SequentialProcess process = new SequentialProcess();
    process.add(new TestPutUserProfileTaskStep(userId, userProfileTask, key.getPublic(), node));
    process.add(new GetUserProfileTaskStep(context, node));
    process.add(new RemoveUserProfileTaskStep(context, node));

    UseCaseTestUtil.executeProcess(process);

    Parameters parameters = new Parameters().setLocationKey(userId).setDomainKey(H2HConstants.USER_PROFILE_TASK_DOMAIN)
View Full Code Here

    // fetch task from network, respectively the implicit queue
    List<TestUserProfileTask> downloadedTasks = new ArrayList<TestUserProfileTask>();
    SimpleGetUserProfileTaskContext context = new SimpleGetUserProfileTaskContext();
    while (true) {
      GetUserProfileTaskStep getStep = new GetUserProfileTaskStep(context, node);
      UseCaseTestUtil.executeProcess(getStep);
      if (context.consumeUserProfileTask() != null) {
        TestUserProfileTask task = (TestUserProfileTask) context.consumeUserProfileTask();
        downloadedTasks.add(task);
        // remove successfully get user profile tasks
View Full Code Here

     * 1. Remove done user profile task from network.
     * 2. Get next user profile task.
     * 3. Handle fetched user profile task (can be null if no next UPtask exists)
     */
    getParent().add(new RemoveUserProfileTaskStep(context, networkManager));
    getParent().add(new GetUserProfileTaskStep(context, networkManager));
    getParent().add(new HandleUserProfileTaskStep(context, networkManager));
  }
View Full Code Here

TOP

Related Classes of org.hive2hive.core.processes.implementations.common.userprofiletask.GetUserProfileTaskStep

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.