I have a long running task that is executing in the background on an ExecutorService thread pool. What are some best practices in terms of this task returning progress or intermediate results? Are there any libraries that provide this functionality?
EDIT: To clarify, I'm talking about reporting progress to other code, not to the user.
Normally I would use SwingWorker, but I'm working with a Java/Groovy backend for a Grails app, and I'm unsure how that would behave in a headless server environment since it has EDT ties.
Another example is the Jobs framework in Eclipse RCP, but I would need something that doesn't have ties to the UI.