@Override public void handlerError(Exception e) { if (listener != null) { listener.onException(e); } }
/** * Submits next task for the execution */ private void continueExecution() { //increment task index i++; //submit next if the end of the chain not reached yet if (i < task.length && task[i] != null) { scheduler.submit(task[i]); } else if (listener != null) { listener.onTermination(); } }