ch.javasoft.job
Class Jobs<R>

java.lang.Object
  extended by ch.javasoft.job.Jobs<R>

public class Jobs<R>
extends Object

The Jobs class contains methods to create jobs from runnables and callables.


Method Summary
static
<R> Job<R>
create(Callable<R> callable)
          Creates a new executable from the given callable.
static Job<Void> create(Runnable runnable)
          Creates a new executable from the given runnable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static <R> Job<R> create(Callable<R> callable)
Creates a new executable from the given callable. The exec() and execAndWait() methods of the returned executable are processed in a new thread.

Type Parameters:
R - the return type of the callable
Parameters:
callable - the callable to convert into an executable
Returns:
the executable for execution in a new thread

create

public static Job<Void> create(Runnable runnable)
Creates a new executable from the given runnable. The exec() and execAndWait() methods of the returned executable are processed in a new thread.

Parameters:
runnable - the runnable to convert into an executable
Returns:
the executable for execution in a new thread