com.levigo.util.concurrent.tasks
Interface TaskScope<R>

Type Parameters:
R - the type of result the tasks return

public interface TaskScope<R>

A TaskScope defines a common unit of management for tasks sharing a common goal or purpose. The scope gets notified when one of its tasks has completed or failed.


Method Summary
 void taskCompleted(R result)
          Receive notification about a task that has been completed without exceptions.
 void taskFailed(Task<R> task, Throwable reason)
          Receive notification about a task that has failed.
 

Method Detail

taskCompleted

void taskCompleted(R result)
Receive notification about a task that has been completed without exceptions.

Parameters:
result - the task's result

taskFailed

void taskFailed(Task<R> task,
                Throwable reason)
Receive notification about a task that has failed.

Parameters:
task - the task
reason - the Throwable that caused the failure


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.