You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Jason van Zyl <jv...@zenplex.com> on 2001/12/28 04:42:43 UTC

Re: cvs commit: jakarta-turbine-3/src/java/org/apache/turbine Pipeline.java

On 12/27/01 9:27 PM, "dlr@apache.org" <dl...@apache.org> wrote:

> dlr         01/12/27 18:27:12
> 
> Modified:    src/java/org/apache/turbine Pipeline.java
> Log:
> Added light JavaDoc to all the methods in the interface.
> 
> I'm wondering why so many methods are needed...comparing this Pipeline
> interface to the one in Catalina, it seems that most methods in the
> interface are simply Valve invocations (pre/post/executeAction might
> be grouped together into a single Action Valve).

They aren't, in the notes I've mentioned that it was a stopgap to make
something called a pipeline. The interface for a pipeline will be very
small.

The interfaces won't be exactly like Catalina but they are close. What's in
this class is basically stuff crufted together and removed from
Turbine.java.

> 
> Catalina does have the concept of a "basic" Valve, which is always
> invoke()'d at the end of the Pipeline and handles the servlet/jsp
> processing.  Additionally, I've modified Catalina to add a Valve which
> takes action at the beginning of thge Pipeline.  I don't see any
> reason why we couldn't do the same here -- Valves for the beginning
> and end of the Pipeline, with any number of Vavles attached in
> between.  Actions/Screens/Layouts would become Modules, and Modules
> are analogous to Valves.
> 
> Revision  Changes    Path
> 1.3       +33 -0 
> jakarta-turbine-3/src/java/org/apache/turbine/Pipeline.java
> 
> Index: Pipeline.java
> ===================================================================
> RCS file: 
> /home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/Pipeline.java,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -u -r1.2 -r1.3
> --- Pipeline.java    2001/10/24 20:54:57    1.2
> +++ Pipeline.java    2001/12/28 02:27:12    1.3
> @@ -78,24 +78,57 @@
>  
>  public interface Pipeline
>  {
> +    /**
> +     * Initializes this instance.  Called once.
> +     */
>      public void init()
>          throws Exception;
>  
> +    /**
> +     * Processes the pipeline.  Called at the beginning of each
> +     * request.
> +     */
>      public void process(RunData data)
>          throws Exception;
>  
> +    /**
> +     * Called before the action is executed.  Called for each request.
> +     *
> +     * @param data Run-time information.
> +     */
>      public void preExecuteAction(RunData data)
>          throws Exception;
>  
> +    /**
> +     * Executes the action.  Called for each request.
> +     *
> +     * @param data Run-time information.
> +     */
>      public void executeAction(RunData data)
>          throws Exception;
>  
> +    /**
> +     * Called after the action is executed.  Called for each request.
> +     *
> +     * @param data Run-time information.
> +     */
>      public void postExecuteAction(RunData data)
>          throws Exception;
>  
> +    /**
> +     * Executes the pipeline.  Called for each request.
> +     *
> +     * @param data Run-time information.
> +     */
>      public void execute(RunData data)
>          throws Exception;
>  
> +    /**
> +     * Called after the pipeline has been executed.  Called at the end
> +     * of each request.
> +     *
> +     * @param data Run-time information.
> +     */
>      public void finished(RunData data)
>          throws Exception;
>  }
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-turbine-3/src/java/org/apache/turbine Pipeline.java

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jason van Zyl <jv...@zenplex.com> writes:

> On 12/27/01 9:27 PM, "dlr@apache.org" <dl...@apache.org> wrote:
>
>> dlr         01/12/27 18:27:12
>> 
>> Modified:    src/java/org/apache/turbine Pipeline.java
>> Log:
>> Added light JavaDoc to all the methods in the interface.
>> 
>> I'm wondering why so many methods are needed...comparing this Pipeline
>> interface to the one in Catalina, it seems that most methods in the
>> interface are simply Valve invocations (pre/post/executeAction might
>> be grouped together into a single Action Valve).
>
> They aren't, in the notes I've mentioned that it was a stopgap to make
> something called a pipeline. The interface for a pipeline will be very
> small.
>
> The interfaces won't be exactly like Catalina but they are close. What's in
> this class is basically stuff crufted together and removed from
> Turbine.java.

Got it, thanks for the explanation.  I found that pipeline
documentation and looked over it as well, merging some of it into the
ClassicPipeline JavaDoc and the rest into the notes/NOTES file.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>