costin      2005/09/28 23:27:50

  Modified:    coyote/src/java/org/apache/coyote ActionHook.java
                        ActionCode.java Adapter.java InputBuffer.java
                        OutputBuffer.java Processor.java
                        ProtocolHandler.java Request.java
  Log:
  Just a bunch of comments.
  
  Revision  Changes    Path
  1.3       +11 -1     
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionHook.java
  
  Index: ActionHook.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionHook.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ActionHook.java   24 Feb 2004 08:54:29 -0000      1.2
  +++ ActionHook.java   29 Sep 2005 06:27:50 -0000      1.3
  @@ -18,7 +18,17 @@
   
   
   /**
  - * Action hook.
  + * Action hook. Actions represent the callback mechanism used by
  + * coyote servlet containers to request operations on the coyote connectors.
  + * Some standard actions are defined in ActionCode, however custom
  + * actions are permitted.
  + *
  + * The param object can be used to pass and return informations related with 
the
  + * action.
  + * 
  + *
  + * This interface is typically implemented by ProtocolHandlers, and the param
  + * is usually a Request or Response object.
    *
    * @author Remy Maucherat
    */
  
  
  
  1.18      +8 -0      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java
  
  Index: ActionCode.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ActionCode.java   16 May 2005 04:58:00 -0000      1.17
  +++ ActionCode.java   29 Sep 2005 06:27:50 -0000      1.18
  @@ -19,7 +19,13 @@
   
   /**
    * Enumerated class containing the adapter event codes.
  + * Actions represent callbacks from the servlet container to the coyote
  + * connector.
    *
  + * Actions are implemented by ProtocolHandler, using the ActionHook 
interface.
  + *
  + * @see ProtocolHandler
  + * @see ActionHook
    * @author Remy Maucherat
    */
   public final class ActionCode {
  @@ -40,6 +46,8 @@
       /**
        * A flush() operation originated by the client ( i.e. a flush() on
        * the servlet output stream or writer, called by a servlet ).
  +     * 
  +     * Argument is the Response.
        */
       public static final ActionCode ACTION_CLIENT_FLUSH = new ActionCode(4);
   
  
  
  
  1.3       +3 -1      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Adapter.java
  
  Index: Adapter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Adapter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Adapter.java      24 Feb 2004 08:54:29 -0000      1.2
  +++ Adapter.java      29 Sep 2005 06:27:50 -0000      1.3
  @@ -18,9 +18,11 @@
   
   
   /**
  - * Adapter.
  + * Adapter. This represents the entry point in a coyote-based servlet 
container.
  + *
    *
    * @author Remy Maucherat
  + * @see ProtocolHandler
    */
   public interface Adapter {
   
  
  
  
  1.8       +4 -0      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/InputBuffer.java
  
  Index: InputBuffer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/InputBuffer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- InputBuffer.java  24 Feb 2004 08:54:29 -0000      1.7
  +++ InputBuffer.java  29 Sep 2005 06:27:50 -0000      1.8
  @@ -23,6 +23,10 @@
   
   /**
    * Input buffer.
  + *
  + * This class is used only in the protocol implementation. All reading from 
tomcat ( or adapter ) should be done
  + * using Request.doRead().
  + *
    * 
    * @author Remy Maucherat
    */
  
  
  
  1.8       +11 -1     
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/OutputBuffer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- OutputBuffer.java 24 Feb 2004 08:54:29 -0000      1.7
  +++ OutputBuffer.java 29 Sep 2005 06:27:50 -0000      1.8
  @@ -23,13 +23,23 @@
   
   /**
    * Output buffer.
  + *
  + * This class is used internally by the protocol implementation. All writes 
from higher level code should happen
  + * via Resonse.doWrite().
    * 
    * @author Remy Maucherat
    */
   public interface OutputBuffer {
   
   
  -    public int doWrite(ByteChunk chunk, Response response) 
  +    /** Write the response. The caller ( tomcat ) owns the chunks.
  +     *
  +     * @param chunk data to write
  +     * @param response used to allow buffers that can be shared by multiple 
responses.
  +     * @return
  +     * @throws IOException
  +     */
  +    public int doWrite(ByteChunk chunk, Response response)
           throws IOException;
   
   
  
  
  
  1.3       +2 -0      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Processor.java
  
  Index: Processor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Processor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Processor.java    24 Feb 2004 08:54:29 -0000      1.2
  +++ Processor.java    29 Sep 2005 06:27:50 -0000      1.3
  @@ -24,6 +24,8 @@
   /**
    * Processor.
    *
  + * Not really used, should be deprecated. 
  + *
    * @author Remy Maucherat
    */
   public interface Processor {
  
  
  
  1.8       +4 -0      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ProtocolHandler.java
  
  Index: ProtocolHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ProtocolHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProtocolHandler.java      11 Nov 2004 14:52:45 -0000      1.7
  +++ ProtocolHandler.java      29 Sep 2005 06:27:50 -0000      1.8
  @@ -24,8 +24,12 @@
    * Processor is single threaded and specific to stream-based protocols,
    * will not fit Jk protocols like JNI.
    *
  + * This is the main interface to be implemented by a coyoute connector.
  + * Adapter is the main interface to be impleneted by a coyote servlet 
container.
  + *
    * @author Remy Maucherat
    * @author Costin Manolache
  + * @see Adapter
    */
   public interface ProtocolHandler {
   
  
  
  
  1.32      +6 -0      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java
  
  Index: Request.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Request.java      6 Jan 2005 00:46:37 -0000       1.31
  +++ Request.java      29 Sep 2005 06:27:50 -0000      1.32
  @@ -421,6 +421,12 @@
   
       /**
        * Read data from the input buffer and put it into a byte chunk.
  +     *
  +     * The buffer is owned by the protocol implementation - it will be 
reused on the next read.
  +     * The Adapter must either process the data in place or copy it to a 
separate buffer if it needs
  +     * to hold it. In most cases this is done during byte->char conversions 
or via InputStream. Unlike
  +     * InputStream, this interface allows the app to process data in place, 
without copy.
  +     *
        */
       public int doRead(ByteChunk chunk) 
           throws IOException {
  
  
  

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

Reply via email to