users@jersey.java.net

Callback hook for when http response finished?

From: Chris Wilkes <cwilkes-java_at_ladro.com>
Date: Wed, 8 Jul 2009 16:50:26 -0700

I'm building up a temp file to return to the user after they hit a POST
method in jersey. I'd like to delete that temp file after the user has
finished downloading the file.

Is there a way to get a notification when a user has finished their
download? I'd like to not have to change the return type of my method
from File to do this.

What do other people do in this situation? Currently I delete the file
in a background thread that runs on a timer and deletes old files. I'm
worried that if I rely on File.deleteOnExit() that I'll build up
thousands of temp files.