示例#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;
 }
示例#2
0
 public String name() {
   // TODO Change name to use TASKNAME instead of class eg: ICICITransaction instead of
   // TRANSACTIONDOWNLOADER
   return taskClass.getSimpleName().toUpperCase();
 }