Exemplo n.º 1
0
 public ILongTask getTask(ThreadPoolExecutor executor) {
   try {
     try {
       Constructor constructor = taskClass.getConstructor(ThreadPoolExecutor.class);
       return (ILongTask) constructor.newInstance(executor);
     } catch (NoSuchMethodException e) {
       return (ILongTask) taskClass.newInstance();
     }
   } catch (Exception e) {
     logger.fatal(e, e);
   }
   return null;
 }
Exemplo n.º 2
0
 public String name() {
   // TODO Change name to use TASKNAME instead of class eg: ICICITransaction instead of
   // TRANSACTIONDOWNLOADER
   return taskClass.getSimpleName().toUpperCase();
 }