Package org.distributeme.core.asynch
Class MultiCallCollector
java.lang.Object
org.distributeme.core.asynch.MultiCallCollector
A helper class to synchronously execute multiple asynchronous calls and collect results.
- Version:
- $Id: $Id
- Author:
- lrosenberg
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn instance of this class is used as a call handler for each subcall. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSubCallHandler.getReturnException.getReturnValue(String id) getReturnValue.booleanisError.booleanisFinished.booleanisSuccess.protected voidnotifySubCallFinished.voidwaitForResults.voidwaitForResults(long timeout) waitForResults.
-
Constructor Details
-
MultiCallCollector
public MultiCallCollector(int aNumberOfCalls) Constructor for MultiCallCollector.
- Parameters:
aNumberOfCalls- a int.
-
-
Method Details
-
waitForResults
waitForResults.
- Parameters:
timeout- a long.- Throws:
InterruptedException- if any.
-
waitForResults
waitForResults.
- Throws:
InterruptedException- if any.
-
isFinished
public boolean isFinished()isFinished.
- Returns:
- a boolean.
-
createSubCallHandler
createSubCallHandler.
- Parameters:
id- aStringobject.- Returns:
- a
CallBackHandlerobject.
-
notifySubCallFinished
protected void notifySubCallFinished()notifySubCallFinished.
-
isError
isError.
- Parameters:
id- aStringobject.- Returns:
- a boolean.
-
isSuccess
isSuccess.
- Parameters:
id- aStringobject.- Returns:
- a boolean.
-
getReturnValue
getReturnValue.
-
getReturnException
getReturnException.
-