I use embedded Jetty to host a WEB server. Requests are forwarded (by my internal implementation) to code from dynamically loaded JARs. At some time I need to hot-update in-memory JARs and for that purpose I wait for requests to complete, but it may happen that either because of programming mistake or because of actual long-running action waiting goes beyond reasonable time.
I'd like to cancel processing of WEB request after some timeout.
What can I do in such case with Jetty (v.8+)?
PS: I'm aware about Thread.stop() over the thread with stuck WEB request and it does not seem to be a good approach.