jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] FilterAction and FilterContext

From: Bill Burke <bburke_at_redhat.com>
Date: Fri, 18 Nov 2011 10:21:22 -0500

On 11/18/11 10:14 AM, Santiago Pericas-Geertsen wrote:
> Hi Sergey,
>
> It's an interesting observation. However, I think there may be use cases in which you want to stop the chain _without_ producing a response.
>
> Suppose an app has 2 authentication filters (e.g. for different authentication mechanisms it supports): if the first filter authenticates the user, then there's no need to run the next filter but there's also no response to be set. This is why I think there's value in separating continuations from responses.
>

A filter should not be able to stop the chain unless it is providing a
response. How would a filter know whether stopping the chain was
correct behavior without full knowledge of the whole filter stack?

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com