Holger's
Java API

com.antelmann.util
Interface ThreadWorker.Listener

All Superinterfaces:
EventListener
Enclosing class:
ThreadWorker

public static interface ThreadWorker.Listener
extends EventListener

listens for tasks run by a ThreadWorker to be finished


Method Summary
 void taskPerformed(Executor executor, Runnable task, long timeTaken, Throwable exceptionIfAny)
          called after ThreadWorker has finished running the task.
 

Method Detail

taskPerformed

void taskPerformed(Executor executor,
                   Runnable task,
                   long timeTaken,
                   Throwable exceptionIfAny)
called after ThreadWorker has finished running the task. The current task is not yet removed from the queue when this method is called. The running thread has ownership over the ThreadWorker when this method is called.

Parameters:
task - the task that just finished running
timeTaken - the time (in milliseconds) it took to run the task
exceptionIfAny - if an Exception was thrown during task execution, it will be held by this parameter. This should be null if the task ended normally.


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads