Hi all,

I have checked in SVN the changes to Filter. I finally used an int instead
of an enum to prevent the apparition of a new artifact in the Javadocs,
increasing the perception of complexity for users (this is subjective I
know).

Here are the details of the change:

"Filter.beforeHandle() and doHandle() methods can now indicates if the
processing should continue normal, go to the afterHandle() method directly
or stop immediately. 

IMPORTANT NOTE: as it isn't possible to add a return parameter to an
existing method, the change can break existing filters. In this case, you
just need to return the "CONTINUE" constant from your method and use "int"
as return parameter."

Best regards,
Jerome

> -----Message d'origine-----
> De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part 
> de Jerome Louvel
> Envoyé : vendredi 11 janvier 2008 13:42
> À : discuss@restlet.tigris.org
> Objet : Re: Aborting request in Filter
> 
> Hi Stephan,
> 
> I agree, using enums here makes sense.
> 
> Best regards,
> Jerome
> 
> 
> 
> 2008/1/11, Stephan Koops <[EMAIL PROTECTED] >:
> 
>       What about using the enum instead of ints for the 
> result? They are
>       founded for this feature. ints can be directly compared 
> ( if(result >= 
>       SKIP) or something like that). I don't know if it is 
> possible for enums.
>       
>       Stephan
>       
>       Jerome Louvel schrieb:
>       > Instead, we could become more precise and return an int with
>       > associated constants (CONTINUE | SKIP | STOP) or (DO 
> | AFTER | 
>       > RETURN). What that solve your use case nicely?
>       
> 
> 
> 

Reply via email to