tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java
Date Wed, 04 Dec 2002 23:33:28 GMT
costin      2002/12/04 15:33:28

  Modified:    coyote/src/java/org/apache/coyote ActionCode.java
  Log:
  A small change to ActionCode - add an int id to each action. It can
  be used in switch().
  
  Revision  Changes    Path
  1.11      +34 -25    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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ActionCode.java	24 Nov 2002 11:56:14 -0000	1.10
  +++ ActionCode.java	4 Dec 2002 23:33:27 -0000	1.11
  @@ -70,78 +70,87 @@
       // -------------------------------------------------------------- Constants
   
   
  -    public static final ActionCode ACTION_ACK = new ActionCode();
  +    public static final ActionCode ACTION_ACK = new ActionCode(1);
   
   
  -    public static final ActionCode ACTION_CLOSE = new ActionCode();
  +    public static final ActionCode ACTION_CLOSE = new ActionCode(2);
   
   
  -    public static final ActionCode ACTION_COMMIT = new ActionCode();
  +    public static final ActionCode ACTION_COMMIT = new ActionCode(3);
   
   
       /**
        * A flush() operation originated by the client ( i.e. a flush() on
        * the servlet output stream or writer, called by a servlet ).
        */
  -    public static final ActionCode ACTION_CLIENT_FLUSH = new ActionCode();
  +    public static final ActionCode ACTION_CLIENT_FLUSH = new ActionCode(4);
   
       
  -    public static final ActionCode ACTION_CUSTOM = new ActionCode();
  +    public static final ActionCode ACTION_CUSTOM = new ActionCode(5);
   
   
  -    public static final ActionCode ACTION_RESET = new ActionCode();
  +    public static final ActionCode ACTION_RESET = new ActionCode(6);
   
   
  -    public static final ActionCode ACTION_START = new ActionCode();
  +    public static final ActionCode ACTION_START = new ActionCode(7);
   
   
  -    public static final ActionCode ACTION_STOP = new ActionCode();
  +    public static final ActionCode ACTION_STOP = new ActionCode(8);
   
   
  -    public static final ActionCode ACTION_WEBAPP = new ActionCode();
  +    public static final ActionCode ACTION_WEBAPP = new ActionCode(9);
   
  -
  -    /**
  -     * Hook called after request, but before recycling. Can be used
  -     * for logging, to update counters, custom cleanup - the request
  -     * is still visible
  -     */
  -    public static final ActionCode ACTION_POST_REQUEST = new ActionCode();
  +    /** Hook called after request, but before recycling. Can be used
  +        for logging, to update counters, custom cleanup - the request
  +        is still visible
  +    */
  +    public static final ActionCode ACTION_POST_REQUEST = new ActionCode(10);
   
       /**
        * Callback for lazy evaluation - extract the remote host name.
        */
       public static final ActionCode ACTION_REQ_HOST_ATTRIBUTE = 
  -        new ActionCode();
  +        new ActionCode(11);
   
   
       /**
  -     * Callback for lazy evaluation - extract the remote host address.
  +     * Callback for lazy evaluation - extract the SSL-related attributes.
        */
  -    public static final ActionCode ACTION_REQ_HOST_ADDR_ATTRIBUTE = 
  -        new ActionCode();
  -
  +    public static final ActionCode ACTION_REQ_HOST_ADDR_ATTRIBUTE = new ActionCode(12);
   
       /**
        * Callback for lazy evaluation - extract the SSL-related attributes.
        */
  -    public static final ActionCode ACTION_REQ_SSL_ATTRIBUTE = new ActionCode();
  +    public static final ActionCode ACTION_REQ_SSL_ATTRIBUTE = new ActionCode(13);
  +
  +
  +    /** Chain for request creation. Called each time a new request is created
  +        ( requests are recycled ).
  +     */
  +    public static final ActionCode ACTION_NEW_REQUEST = new ActionCode(14);
   
   
       /**
        * Callback for lazy evaluation - extract the SSL-certificate 
        * (including forcing a re-handshake if necessary)
        */
  -    public static final ActionCode ACTION_REQ_SSL_CERTIFICATE = new ActionCode();
  +    public static final ActionCode ACTION_REQ_SSL_CERTIFICATE = new ActionCode(14);
   
   
       // ----------------------------------------------------------- Constructors
  -
  +    int code;
   
       /**
        * Private constructor.
        */
  -    private ActionCode() {
  +    private ActionCode(int code) {
  +        this.code=code;
  +    }
  +
  +    /** Action id, useable in switches and table indexes
  +     */
  +    public int getCode() {
  +        return code;
       }
   
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message