Quoting "Craig R. McClanahan" <[EMAIL PROTECTED]>:

> THE PROPOSED DESIGN PATTERN:
> 
> This is an adaptation of the pattern that Peter Donald proposed
> yesterday, to be
> slightly more aligned with the Filter API:
> 
>     public interface Valve {    <-- similar to javax.servlet.Filter
>         public Container getContainer();    <-- Many valves need this
>         public void setContainer(Container container);
>         public void invoke(Request request, Response response,
>             Pipeline pipeline) throws IOException, ServletException
>     }
> 
> and the typical usage pattern in invoke() would be
> 
>     ... preprocess the request ...
>     pipeline.invoke(request, response);
>     ... postprocess the response ...
> 
> where the pipeline would manage the details of where the current request
> is in
> the set of Valves to be processed, handles the "falling off the end"
> problem,
> and so on.
> 
> IMPACT OF CHANGE:
> 
> The following changes would be required inside the Tomcat 4.0 source
> repository
> (I would be willing to undertake this, if the proposal is approved,
> unless some
> other committer would like to volunteer instead):
> 
> * Rewrite the existing Pipeline and Valve interfaces
> 
> * Create standard Pipeline implementation class(es) that
>   can be used by all containers, including support for pooling
>   if that approach is selected.
> 
> * Modify all existing Container and Valve implementations to
>   utilize the new APIs.  In most cases, these changes would
>   be simplifications in the common ContainerBase and ValveBase
>   classes, although each individual Valve would need to have
>   its invoke() method signature and the way it invokes the next
>   Valve in the pipline updated to the new APIs
> 
> * Release of a second beta that incorporates this change, to allow
>   regression testing and make sure nothing got broken along the way.
> 
> * After completion, forward port to the 4.1 repository to maintain
>   compatibility.
> 
> 
> RECOMMENDATION:
> 
> I recommend that we do this change, and do it in 4.0 (rather than
> waiting for
> 4.1).  The revised design pattern is cleaner and easier for Valve
> implementors,
> and doing this in 4.0 would avoid an incompatible API change between 4.0
> and
> 4.1.
> 
> What do you think?

+1.
Forget about my other email : this one clarified everything.

Remy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to