ibspan.ecap.merchant.shopdecisions.negotiationpreparation
Class PreparationTaskRunner
java.lang.Object
ibspan.ecap.merchant.shopdecisions.negotiationpreparation.PreparationTaskRunner
public class PreparationTaskRunner
- extends java.lang.Object
A class responsible for running PreparationTask
s and serving as a completion service
providing methods to retrieve completed task results.
- Author:
- Micha³ Drozdowicz
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PreparationTaskRunner
public PreparationTaskRunner()
takeResult
public NegotiationDescription takeResult()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
- Performs a blocking receive of a finished task. Blocks the execution of the calling thread
until a task completes and the result is available.
- Returns:
- the result of a completed task.
- Throws:
java.lang.InterruptedException
- when the calling thread has been interrupted while waiting
for the result
java.util.concurrent.ExecutionException
runPreparationTask
public java.util.concurrent.Future<NegotiationDescription> runPreparationTask(PreparationTask task)
- Executes the specified task.
- Parameters:
task
- the task to be executed
- Returns:
- the
Future
describing the future result of the task.