Class MultiCallCollector

java.lang.Object
org.distributeme.core.asynch.MultiCallCollector

public class MultiCallCollector extends Object
A helper class to synchronously execute multiple asynchronous calls and collect results.
Version:
$Id: $Id
Author:
lrosenberg
  • Constructor Details

    • MultiCallCollector

      public MultiCallCollector(int aNumberOfCalls)

      Constructor for MultiCallCollector.

      Parameters:
      aNumberOfCalls - a int.
  • Method Details

    • waitForResults

      public void waitForResults(long timeout) throws InterruptedException

      waitForResults.

      Parameters:
      timeout - a long.
      Throws:
      InterruptedException - if any.
    • waitForResults

      public void waitForResults() throws InterruptedException

      waitForResults.

      Throws:
      InterruptedException - if any.
    • isFinished

      public boolean isFinished()

      isFinished.

      Returns:
      a boolean.
    • createSubCallHandler

      public CallBackHandler createSubCallHandler(String id)

      createSubCallHandler.

      Parameters:
      id - a String object.
      Returns:
      a CallBackHandler object.
    • notifySubCallFinished

      protected void notifySubCallFinished()

      notifySubCallFinished.

    • isError

      public boolean isError(String id)

      isError.

      Parameters:
      id - a String object.
      Returns:
      a boolean.
    • isSuccess

      public boolean isSuccess(String id)

      isSuccess.

      Parameters:
      id - a String object.
      Returns:
      a boolean.
    • getReturnValue

      public Object getReturnValue(String id)

      getReturnValue.

      Parameters:
      id - a String object.
      Returns:
      a Object object.
    • getReturnException

      public Exception getReturnException(String id)

      getReturnException.

      Parameters:
      id - a String object.
      Returns:
      a Exception object.