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