org.gcube.common.scope.impl
Class ScopedTasks

java.lang.Object
  extended by org.gcube.common.scope.impl.ScopedTasks

public class ScopedTasks
extends Object

Utility to bind the execution of standard tasks to the current scope.

Author:
Fabio Simeoni

Constructor Summary
ScopedTasks()
           
 
Method Summary
static
<V> Callable<V>
bind(Callable<V> task)
          Binds a Callable task to the current scope.
static
<V> Runnable
bind(Runnable task)
          Binds a Runnable task to the current scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScopedTasks

public ScopedTasks()
Method Detail

bind

public static <V> Callable<V> bind(Callable<V> task)
Binds a Callable task to the current scope.

Parameters:
task - the task
Returns:
an equivalent Callable task bound to the current scope

bind

public static <V> Runnable bind(Runnable task)
Binds a Runnable task to the current scope.

Parameters:
task - the task
Returns:
an equivalent Runnable task bound to the current scope


Copyright © 2013. All Rights Reserved.