users@jersey.java.net

[Jersey] Re: processing Response returned from Resource method

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Wed, 12 Oct 2011 14:41:33 +0200

Not sure I understand why you need to check whether the Response is an instance of ResponseImpl. Can you elaborate?

Btw. in general it is certainly a bad idea to do that. You would be making your code dependent on an implementation
detail that can change at any time in future without any prior warning.

Marek

On 10/12/2011 07:09 AM, richardl_at_ufp.com wrote:
> I have a resource method that is called by a number of resources and returns
> a javax.rs.ws.Response with an entity that represents how the service was
> handled. So in cases of returning to the client, the client would see a 200
> response but the entity would reflect some additional information about the
> request.
>
> I want to utilize the Response object before it is serialized in another
> method that basically returns a 204 and then processes a large post in
> another thread. Is the proper way to do this to check to see if the Response
> is an instanceof ResponseImpl and use that or is there some more elegant way
> to deal with the Response object directly?
>
>
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/processing-Response-returned-from-Resource-method-tp6883669p6883669.html
> Sent from the Jersey mailing list archive at Nabble.com.