Package org.hive2hive.core.processes.framework.exceptions

Examples of org.hive2hive.core.processes.framework.exceptions.ProcessExecutionException


    DataManager dataManager;
    try {
      dataManager = networkManager.getDataManager();
    } catch (NoPeerConnectionException e) {
      throw new ProcessExecutionException(e);
    }

    if (context.consumeUserProfileTask() == null) {
      throw new ProcessExecutionException("User profile task in context is null.");
    }

    boolean success = dataManager.removeUserProfileTask(userId, context.consumeUserProfileTask()
        .getContentKey(), context.consumeUserProfileTask().getProtectionKey());
    removePerformed = true;

    if (!success) {
      throw new ProcessExecutionException("Could not remove the user profile task.");
    }
  }
View Full Code Here


      try {
        result = handle.get();
      } catch (InterruptedException e) {
        logger.error("Error while checking async component.", e);
      } catch (ExecutionException e) {
        throw new ProcessExecutionException("AsyncComponent threw an exception.", e.getCause());
      }

      // initiate rollback if necessary
      if (result != null) {
        throw new ProcessExecutionException(result);
      }
    }
  }
View Full Code Here

   */
  public void join() throws ProcessExecutionException, InterruptedException {
    finishedLatch.await();

    if (isAborted()) {
      throw new ProcessExecutionException(reason);
    } else if (!isDone()) {
      throw new InterruptedException("Could not wait until all downloads are done");
    }
  }
View Full Code Here

  @Override
  protected void doExecute() throws InvalidProcessStateException, ProcessExecutionException {
    try {
      put(userId, userProfileTask, publicKey);
    } catch (PutFailedException e) {
      throw new ProcessExecutionException(e);
    }
  }
View Full Code Here

        try {
          send(message, getPublicKey(nodeB));
          Assert.fail();
        } catch (SendFailedException e) {
          // expected
          throw new ProcessExecutionException("Expected behavior.", e);
        }
      }

      @Override
      public void handleResponseMessage(ResponseMessage responseMessage) {
View Full Code Here

      protected void doExecute() throws InvalidProcessStateException, ProcessExecutionException {
        try {
          sendDirect(message, getPublicKey(nodeB));
          Assert.fail();
        } catch (SendFailedException e) {
          throw new ProcessExecutionException("Expected behavior.", e);
        }
      }
    };
    TestProcessComponentListener listener = new TestProcessComponentListener();
    step.attachListener(listener);
View Full Code Here

    @Override
    protected void doExecute() throws InvalidProcessStateException, ProcessExecutionException {
      NetworkContent content = get(locationKey, contentKey);
      this.content = content;
      if (content == null)
        throw new ProcessExecutionException("Content is null.");
    }
View Full Code Here

    @Override
    protected void doExecute() throws InvalidProcessStateException, ProcessExecutionException {
      try {
        remove(locationKey, contentKey, null);
      } catch (RemoveFailedException e) {
        throw new ProcessExecutionException(e);
      }
    }
View Full Code Here

    @Override
    protected void doExecute() throws InvalidProcessStateException, ProcessExecutionException {
      try {
        put(locationKey, contentKey, data, null);
      } catch (PutFailedException e) {
        throw new ProcessExecutionException(e);
      }
    }
View Full Code Here

    } else {
      metaChunks = metaFile.getVersionByIndex(context.getVersionToDownload()).getMetaChunks();
    }

    if (!validateDestination()) {
      throw new ProcessExecutionException(
          "File already exists on disk. Content does match; no download needed.");
    }

    try {
      // start the download
      DownloadTaskDHT task = new DownloadTaskDHT(metaChunks, destination, metaFile.getChunkKey()
          .getPrivate());
      session.getDownloadManager().submit(task);
      task.join();
    } catch (InterruptedException e) {
      throw new ProcessExecutionException(e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of org.hive2hive.core.processes.framework.exceptions.ProcessExecutionException

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.