/** * The code to be run. * @return True, when execution should continue. */ protected boolean code() { return executable.execute(); }
/** * Perform the task once and notify the manager. */ public void run() { boolean execute = false; try { // System.out.println("Executing: "+this); execute = executable.execute(); } catch(RuntimeException e) { e.printStackTrace(); } synchronized(LoadManagingExecutionService.this) { if(execute) { LoadManagingExecutionService.this.execute(executable, priority); } LoadManagingExecutionService.this.taskPerformed(this); } }