You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by ha...@apache.org on 2001/11/14 04:06:59 UTC

cvs commit: jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport PingReply.java PingRequest.java Reply.java Request.java

hammant     01/11/13 19:06:59

  Modified:    apps/db/src/java/org/apache/avalon/db/server
                        AbstractDatabaseManager.java
               apps/db/src/java/org/apache/avalon/db/transport Reply.java
                        Request.java
  Added:       apps/db/src/java/org/apache/avalon/db/transport
                        PingReply.java PingRequest.java
  Log:
  Ping stuff.  For keep-alive
  
  Revision  Changes    Path
  1.19      +4 -1      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/AbstractDatabaseManager.java
  
  Index: AbstractDatabaseManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/AbstractDatabaseManager.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- AbstractDatabaseManager.java	2001/11/13 14:16:23	1.18
  +++ AbstractDatabaseManager.java	2001/11/14 03:06:59	1.19
  @@ -31,6 +31,7 @@
   import org.apache.avalon.db.transport.ResultSetReply;
   import org.apache.avalon.db.transport.InsertRequest;
   import org.apache.avalon.db.transport.CreateViewRequest;
  +import org.apache.avalon.db.transport.PingReply;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.ComponentException;
  @@ -42,7 +43,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.18 $
  + * @version $Revision: 1.19 $
    */
   public abstract class AbstractDatabaseManager extends AbstractLogEnabled implements Composable {
   
  @@ -88,6 +89,8 @@
                       return processCreateViewRequest((CreateViewRequest) request);
                   case (Request.INSERT) :
                       return processInsertRequest((InsertRequest) request);
  +                case (Request.PING) :
  +                    return new PingReply(); // For keep alive
               }
   
           } catch (ActionException ae) {
  
  
  
  1.9       +2 -1      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/Reply.java
  
  Index: Reply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/Reply.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Reply.java	2001/11/09 00:27:08	1.8
  +++ Reply.java	2001/11/14 03:06:59	1.9
  @@ -17,7 +17,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public abstract class Reply implements Serializable {
   
  @@ -32,6 +32,7 @@
       public static final int RESULTSETMETADATA = 18;
       public static final int SELECTREPLY = 19;
       public static final int TODOREPLY = 20;
  +    public static final int PINGREPLY = 21;
   
   
       private int mReplyCode;
  
  
  
  1.9       +2 -1      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/Request.java
  
  Index: Request.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/Request.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Request.java	2001/11/09 15:03:20	1.8
  +++ Request.java	2001/11/14 03:06:59	1.9
  @@ -18,7 +18,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public abstract class Request implements Serializable {
   
  @@ -44,6 +44,7 @@
       public static final int GRANT = 129;
       public static final int CREATEVIEW = 130;
       public static final int CREATEINDEX = 131;
  +    public static final int PING = 132;
   
       private int mRequestCode;
   
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/PingReply.java
  
  Index: PingReply.java
  ===================================================================
  
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.avalon.db.transport;
  
  /**
   * Class PingReply
   *
   *
   * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
   * @version $Revision: 1.1 $
   */
  public class PingReply extends Reply {
  
  
      /**
       * Constructor PingReply
       *
       *
       */
      public PingReply() {
          super(PINGREPLY);
      }
  
  
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/PingRequest.java
  
  Index: PingRequest.java
  ===================================================================
  
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.avalon.db.transport;
  
  
  
  /**
   * Class PingRequest
   *
   *
   * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
   * @version $Revision: 1.1 $
   */
  public class PingRequest extends Request {
  
      /**
       * Constructor PingRequest
       *
       *
       */
      public PingRequest() {
          super(PING);
      }
  
  }
  
  
  

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