public void restart(){
  cancel();
  Objects.requireNonNull(task,"Task must be specified either in constructor or by passing it to restart() method");
  taskHandler=backgroundWorker.handle(task);
  taskHandler.execute();
}

public void restart ( ) { cancel ( ) ; Objects . requireNonNull ( task , "Task must be specified either in constructor or by passing it to restart() method" ) ; taskHandler = backgroundWorker . handle ( task ) ; taskHandler . execute ( ) ; }
cancel running task if there is at the moment . launch it again .
