users@jersey.java.net

[Jersey] Re: Event for successful response?

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Sun, 30 Sep 2012 10:11:57 -0700

Hi,
we don't have such facility at the moment. We're adding a CompletionCallback to the JAX-RS API in version 2.0 which will be released early in 2013.

See: http://jax-rs-spec.java.net/nonav/2.0-SNAPSHOT/apidocs/javax/ws/rs/container/CompletionCallback.html

Regards,
Marek

On Sep 29, 2012, at 12:23 PM, Sven Jacobs <sven.jacobs_at_web.de> wrote:

> I would like to perform some action *after* a successful REST response has been send.
> For example:
>
> @Path("/")
> class Example {
> @GET
> public String example() {
> return "Hello world"; // How to perform some action after the response has been send?
> }
> }
>
> Is there some kind of event handler I can inject and add a listener or something like that?
>
> Thanks
>
> Sven