users@jax-rs-spec.java.net

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

From: Bill Burke <bburke_at_redhat.com>
Date: Tue, 29 Nov 2011 10:22:28 -0500

On 11/29/11 8:43 AM, Marek Potociar wrote:
> public class MyFilter implements RequestFilter {
>
> public FilterAction preFilter(FilterContext context) {
> // ... do some request processing
> if (stopProcessing) {
> return context.stop(response);
> }
>
> return context.continue(request);
> }
> }
>

Why do you need FilterAction if these methods would be available on
FilterContext?


it could be just:

public void preFilter(ctx) {

    if (stop) {
       context.stop(response);
       return;
    }

    context.continue(request);

}

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