pier        00/12/07 09:38:19

  Modified:    catalina/src/share/org/apache/catalina/connector/warp
                        WarpConnection.java WarpConnectionHandler.java
                        WarpConnector.java WarpConstants.java
                        WarpDebug.java WarpEngine.java
                        WarpEngineMapper.java WarpHandler.java
                        WarpHandlerTable.java WarpPacket.java
                        WarpReader.java WarpRequestHandler.java
  Log:
  Nice reindentation of source files.
  
  Revision  Changes    Path
  1.4       +7 -8      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnection.java
  
  Index: WarpConnection.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnection.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WarpConnection.java       2000/12/07 17:25:31     1.3
  +++ WarpConnection.java       2000/12/07 17:38:10     1.4
  @@ -69,7 +69,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpConnection.java,v 1.3 2000/12/07 17:25:31 pier Exp $
  + * @version CVS $Id: WarpConnection.java,v 1.4 2000/12/07 17:38:10 pier Exp $
    */
   public class WarpConnection implements Lifecycle, Runnable {
   
  @@ -88,16 +88,16 @@
       private String name=null;
       /** Wether we started or not. */
       private boolean started=false;
  -    
  +
       // -------------------------------------------------------- BEAN PROPERTIES
   
       /** The socket used in this connection. */
       private Socket socket=null;
       /** The connector wich created this connection. */
       private WarpConnector connector=null;
  -    
  +
       // ------------------------------------------------------------ CONSTRUCTOR
  -    
  +
       /**
        * Create a new WarpConnection instance.
        */
  @@ -131,7 +131,7 @@
           try {
               // Open the socket InputStream
               in=this.socket.getInputStream();
  -            
  +
               // Read packets
               while(this.started) {
                   // RID number
  @@ -206,7 +206,7 @@
               throw new LifecycleException("Null socket");
           if (this.connector==null)
               throw new LifecycleException("Null connector");
  -        
  +
           // Register the WarpConnectionHandler for RID=0 (connection)
           WarpHandler h=new WarpConnectionHandler();
           h.setConnection(this);
  @@ -265,7 +265,7 @@
               this.log(e);
               throw new LifecycleException("Closing connection "+this.name,e);
           }
  -        
  +
           this.socket=null;
           // Log this step
           this.log("Connection closed");
  @@ -374,4 +374,3 @@
           if (DEBUG) WarpDebug.debug(this,exc);
       }
   }
  -    
  \ No newline at end of file
  
  
  
  1.5       +2 -3      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnectionHandler.java
  
  Index: WarpConnectionHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnectionHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WarpConnectionHandler.java        2000/12/07 17:25:31     1.4
  +++ WarpConnectionHandler.java        2000/12/07 17:38:10     1.5
  @@ -64,7 +64,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpConnectionHandler.java,v 1.4 2000/12/07 17:25:31 pier Exp 
$
  + * @version CVS $Id: WarpConnectionHandler.java,v 1.5 2000/12/07 17:38:10 pier Exp 
$
    */
   public class WarpConnectionHandler extends WarpHandler {
       /** The WarpReader associated with this WarpConnectionHandler. */
  @@ -82,7 +82,7 @@
        * <br>
        * This method will return true if another packet is expected for this
        * RID, or it will return false if this was the last packet for this RID.
  -     * When we return false this handler is unregistered, and the Thread 
  +     * When we return false this handler is unregistered, and the Thread
        * started in the init() method is terminated.
        *
        * @param type The WARP packet type.
  @@ -153,4 +153,3 @@
           }
       }
   }
  -    
  \ No newline at end of file
  
  
  
  1.2       +12 -13    
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnector.java
  
  Index: WarpConnector.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConnector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WarpConnector.java        2000/12/07 17:25:31     1.1
  +++ WarpConnector.java        2000/12/07 17:38:10     1.2
  @@ -78,7 +78,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpConnector.java,v 1.1 2000/12/07 17:25:31 pier Exp $
  + * @version CVS $Id: WarpConnector.java,v 1.2 2000/12/07 17:38:10 pier Exp $
    */
   public class WarpConnector implements Connector, Lifecycle, Runnable {
   
  @@ -118,7 +118,7 @@
       private String appbase="";
   
       // ------------------------------------------------------------ CONSTRUCTOR
  -    
  +
       public WarpConnector() {
           super();
           this.lifecycle=new LifecycleSupport(this);
  @@ -127,7 +127,7 @@
   
       // --------------------------------------------------------- PUBLIC METHODS
   
  -    /** 
  +    /**
        * Run the acceptor thread, the thread that will wait on the server socket
        * and create new connections.
        */
  @@ -181,7 +181,7 @@
           // Validate and update our current state
           if (started)
               throw new LifecycleException("Connector already started");
  -    
  +
           // We're starting
           lifecycle.fireLifecycleEvent(START_EVENT, null);
           this.started=true;
  @@ -208,7 +208,7 @@
           // We're stopping
           lifecycle.fireLifecycleEvent(STOP_EVENT, null);
           started = false;
  -        
  +
           // Close the server socket
           try {
               this.socket.close();
  @@ -341,23 +341,22 @@
        * Return the port number on which we listen for HTTP requests.
        */
       public int getPort() {
  -     return(this.port);
  +        return(this.port);
       }
   
  -
       /**
        * Set the port number on which we listen for HTTP requests.
        */
       public void setPort(int port) {
           if (DEBUG) this.debug("Setting port to "+port);
  -     this.port=port;
  +        this.port=port;
       }
   
       /**
        * Return the accept count for this Connector.
        */
       public int getAcceptCount() {
  -     return (this.acceptcount);
  +        return (this.acceptcount);
       }
   
       /**
  @@ -367,7 +366,7 @@
        */
       public void setAcceptCount(int acceptcount) {
           if (DEBUG) this.debug("Setting accept count to "+acceptcount);
  -     this.acceptcount=acceptcount;
  +        this.acceptcount=acceptcount;
       }
   
       /**
  @@ -375,7 +374,7 @@
        * pathname, a relative pathname, or a URL.
        */
       public String getAppBase() {
  -     return (this.appbase);
  +        return (this.appbase);
       }
   
       /**
  @@ -385,8 +384,8 @@
       public void setAppBase(String appbase) {
           if (appbase==null) return;
           if (DEBUG) this.debug("Setting application root to "+appbase);
  -     String old=this.appbase;
  -     this.appbase=appbase;
  +        String old=this.appbase;
  +        this.appbase=appbase;
       }
   
       // ------------------------------------------ LOGGING AND DEBUGGING METHODS
  
  
  
  1.4       +1 -2      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConstants.java
  
  Index: WarpConstants.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpConstants.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WarpConstants.java        2000/12/07 17:25:31     1.3
  +++ WarpConstants.java        2000/12/07 17:38:10     1.4
  @@ -62,7 +62,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpConstants.java,v 1.3 2000/12/07 17:25:31 pier Exp $
  + * @version CVS $Id: WarpConstants.java,v 1.4 2000/12/07 17:38:10 pier Exp $
    */
   public class WarpConstants {
   
  @@ -99,4 +99,3 @@
       public static final int TYP_REQINIT_ERR = 0x0001E;
       public static final int TYP_REQINIT_ACK = 0x0001F;
   }
  -                                                
  \ No newline at end of file
  
  
  
  1.3       +3 -3      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpDebug.java
  
  Index: WarpDebug.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpDebug.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WarpDebug.java    2000/12/07 17:25:31     1.2
  +++ WarpDebug.java    2000/12/07 17:38:11     1.3
  @@ -61,7 +61,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpDebug.java,v 1.2 2000/12/07 17:25:31 pier Exp $
  + * @version CVS $Id: WarpDebug.java,v 1.3 2000/12/07 17:38:11 pier Exp $
    */
   public class WarpDebug {
   
  @@ -76,14 +76,14 @@
       private static Object synchronizer=new Object();
   
       // ------------------------------------------------------------ CONSTRUCTOR
  -    
  +
       /**
        * Deny construction.
        */
       private WarpDebug() {
           super();
       }
  -    
  +
       // --------------------------------------------------------- PUBLIC METHODS
   
       /**
  
  
  
  1.2       +2 -2      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpEngine.java
  
  Index: WarpEngine.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpEngine.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WarpEngine.java   2000/12/07 17:25:31     1.1
  +++ WarpEngine.java   2000/12/07 17:38:11     1.2
  @@ -75,7 +75,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpEngine.java,v 1.1 2000/12/07 17:25:31 pier Exp $
  + * @version CVS $Id: WarpEngine.java,v 1.2 2000/12/07 17:38:11 pier Exp $
    */
   public class WarpEngine extends ContainerBase implements Engine {
   
  @@ -92,7 +92,7 @@
       private String mapper="org.apache.catalina.connector.warp.WarpEngineMapper";
   
       // ------------------------------------------------------------ CONSTRUCTOR
  -    
  +
       /**
        * Create a new WarpEngine component with the default basic Valve.
        */
  
  
  
  1.2       +2 -3      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpEngineMapper.java
  
  Index: WarpEngineMapper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpEngineMapper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WarpEngineMapper.java     2000/12/07 17:25:31     1.1
  +++ WarpEngineMapper.java     2000/12/07 17:38:12     1.2
  @@ -62,14 +62,13 @@
   import org.apache.catalina.Mapper;
   import org.apache.catalina.Request;
   
  -
   /**
    *
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpEngineMapper.java,v 1.1 2000/12/07 17:25:31 pier Exp $
  + * @version CVS $Id: WarpEngineMapper.java,v 1.2 2000/12/07 17:38:12 pier Exp $
    */
   public class WarpEngineMapper implements Mapper {
   
  @@ -167,4 +166,4 @@
       private void debug(Exception exc) {
           if (DEBUG) WarpDebug.debug(this,exc);
       }
  -}
  \ No newline at end of file
  +}
  
  
  
  1.4       +4 -10     
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpHandler.java
  
  Index: WarpHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WarpHandler.java  2000/12/07 17:25:32     1.3
  +++ WarpHandler.java  2000/12/07 17:38:12     1.4
  @@ -69,7 +69,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpHandler.java,v 1.3 2000/12/07 17:25:32 pier Exp $
  + * @version CVS $Id: WarpHandler.java,v 1.4 2000/12/07 17:38:12 pier Exp $
    */
   public abstract class WarpHandler implements Lifecycle, Runnable {
   
  @@ -78,7 +78,6 @@
       /** Our debug flag status (Used to compile out debugging information). */
       protected static final boolean DEBUG=WarpDebug.DEBUG;
   
  -
       // -------------------------------------------------------- LOCAL VARIABLES
   
       /** The lifecycle event support for this component. */
  @@ -101,9 +100,7 @@
       /** The WARP RID associated with this WarpHandler. */
       private int rid=-1;
   
  -
       // ------------------------------------------------------------ CONSTRUCTOR
  -    
   
       /**
        * Construct a new instance of a WarpHandler.
  @@ -152,7 +149,7 @@
               // and go back to sleep.
               if (this.processed) continue;
   
  -            // The processed flag is set to false, so we need to handle the 
  +            // The processed flag is set to false, so we need to handle the
               // type and buffer to the process() method. If this method
               // returns true, we have some more packets to process before
               // terminating this method.
  @@ -192,7 +189,7 @@
        */
       public final void start()
       throws LifecycleException {
  -        if (this.connection==null) 
  +        if (this.connection==null)
               throw new LifecycleException("Null connection");
           if (this.rid<0)
               throw new LifecycleException("Invalid handler request ID");
  @@ -305,7 +302,7 @@
        * <br>
        * This method will return true if another packet is expected for this
        * RID, or it will return false if this was the last packet for this RID.
  -     * When we return false this handler is unregistered, and the Thread 
  +     * When we return false this handler is unregistered, and the Thread
        * started in the init() method is terminated.
        *
        * @param type The WARP packet type.
  @@ -401,6 +398,3 @@
           if (DEBUG) WarpDebug.debug(this,exc);
       }
   }
  -
  -    
  -    
  \ No newline at end of file
  
  
  
  1.2       +8 -8      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpHandlerTable.java
  
  Index: WarpHandlerTable.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpHandlerTable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WarpHandlerTable.java     2000/11/30 16:34:31     1.1
  +++ WarpHandlerTable.java     2000/12/07 17:38:12     1.2
  @@ -62,7 +62,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpHandlerTable.java,v 1.1 2000/11/30 16:34:31 pier Exp $
  + * @version CVS $Id: WarpHandlerTable.java,v 1.2 2000/12/07 17:38:12 pier Exp $
    */
   public class WarpHandlerTable {
   
  @@ -71,13 +71,13 @@
   
       /** The current size of our arrays. */
       private int size;
  -    
  +
       /** The number of elements present in our arrays. */
       private int num;
  -    
  +
       /** The array of handlers. */
       private WarpHandler handlers[];
  -    
  +
       /** The array of rids. */
       private int rids[];
   
  @@ -164,7 +164,7 @@
           this.handlers[this.num]=handler;
           this.rids[this.num]=rid;
           this.num++;
  -        
  +
           // Whohoo!
           return(true);
       }
  @@ -192,7 +192,7 @@
                   // Now we want to see if we need to shrink our arrays (we don't
                   // want them to grow indefinitely in case of peak data storage)
                   // We check the number of available positions against the value
  -                // of defaultsize*2, so that our free positions are always 
  +                // of defaultsize*2, so that our free positions are always
                   // between 0 and defaultsize*2 (this will reduce the number of
                   // System.arraycopy() calls. Even after the shrinking is done
                   // we still have defaultsize positions available.
  @@ -210,7 +210,7 @@
                       this.handlers=newhandlers;
                       this.rids=newrids;
                   }
  -                
  +
                   // The handler and its rid were removed, and if necessary the
                   // arrays were shrunk. We just need to return the old handler.
                   return(oldhandler);
  @@ -220,7 +220,7 @@
           // Not found.
           return(null);
       }
  -    
  +
       /**
        * Return the array of WarpHandler objects present in this table.
        *
  
  
  
  1.2       +5 -6      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpPacket.java
  
  Index: WarpPacket.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpPacket.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WarpPacket.java   2000/11/30 16:34:31     1.1
  +++ WarpPacket.java   2000/12/07 17:38:13     1.2
  @@ -62,7 +62,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpPacket.java,v 1.1 2000/11/30 16:34:31 pier Exp $
  + * @version CVS $Id: WarpPacket.java,v 1.2 2000/12/07 17:38:13 pier Exp $
    */
   public class WarpPacket {
   
  @@ -74,7 +74,7 @@
   
       /** The current position in the buffer. */
       private int pos;
  -    
  +
       public WarpPacket() {
           super();
           this.buf=new byte[defaultsize];
  @@ -113,14 +113,13 @@
           System.arraycopy(k,0,this.buf,this.pos,k.length);
           this.pos+=k.length;
       }
  -    
  +
       public byte[] getBuffer() {
           return(this.buf);
       }
  -    
  +
       public int getLength() {
           return(this.pos);
       }
  -    
  +
   }
  -    
  \ No newline at end of file
  
  
  
  1.2       +1 -2      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpReader.java
  
  Index: WarpReader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpReader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WarpReader.java   2000/11/30 16:34:31     1.1
  +++ WarpReader.java   2000/12/07 17:38:13     1.2
  @@ -62,7 +62,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpReader.java,v 1.1 2000/11/30 16:34:31 pier Exp $
  + * @version CVS $Id: WarpReader.java,v 1.2 2000/12/07 17:38:13 pier Exp $
    */
   public class WarpReader {
   
  @@ -114,4 +114,3 @@
           return(s);
       }
   }
  -    
  \ No newline at end of file
  
  
  
  1.3       +2 -3      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpRequestHandler.java
  
  Index: WarpRequestHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/warp/WarpRequestHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WarpRequestHandler.java   2000/12/07 17:25:32     1.2
  +++ WarpRequestHandler.java   2000/12/07 17:38:14     1.3
  @@ -64,7 +64,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Pier Fumagalli</a>
    * @author Copyright &copy; 1999, 2000 <a href="http://www.apache.org">The
    *         Apache Software Foundation.
  - * @version CVS $Id: WarpRequestHandler.java,v 1.2 2000/12/07 17:25:32 pier Exp $
  + * @version CVS $Id: WarpRequestHandler.java,v 1.3 2000/12/07 17:38:14 pier Exp $
    */
   public class WarpRequestHandler extends WarpHandler {
       /** The WarpReader associated with this WarpConnectionHandler. */
  @@ -82,7 +82,7 @@
        * <br>
        * This method will return true if another packet is expected for this
        * RID, or it will return false if this was the last packet for this RID.
  -     * When we return false this handler is unregistered, and the Thread 
  +     * When we return false this handler is unregistered, and the Thread
        * started in the init() method is terminated.
        *
        * @param type The WARP packet type.
  @@ -143,4 +143,3 @@
           }
       }
   }
  -    
  \ No newline at end of file
  
  
  

Reply via email to