Code example for Callable

Methods: call

0
  @Override 
  public Void call() throws Exception {
    if (runnable != null) {
      runnable.run();
    } else { 
      callable.call();
    } 
    return null; 
  } 
 
  /** 
   * Invokes the wrapped callable/runnable as a runnable. 
   * 
   * @throws RuntimeException thrown by the wrapped callable/runnable invocation. 
   */ 
  @Override 
  public void run() { 
    if (runnable != null) {
      runnable.run();
    } else {