costin      02/04/03 15:55:05

  Modified:    coyote/src/java/org/apache/coyote Request.java
  Log:
  Added 4 more fields to Request.
  
  Let me know if you think they shouldn't be exposed, I can use
  notes. All are required to support non-http protocols ( i.e. ajp )
  and reuse the same connector/interceptor and low level code.
  
  Revision  Changes    Path
  1.8       +35 -1     
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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Request.java      11 Mar 2002 00:26:50 -0000      1.7
  +++ Request.java      3 Apr 2002 23:55:05 -0000       1.8
  @@ -178,6 +178,10 @@
       protected Cookies cookies = new Cookies(headers);
       protected Parameters parameters = new Parameters();
   
  +    protected MessageBytes remoteUser=new MessageBytes();
  +    protected MessageBytes workerId=new MessageBytes();
  +    protected MessageBytes authType=new MessageBytes();
  +    protected Hashtable attributes=new Hashtable();
   
       // ------------------------------------------------------------- Properties
   
  @@ -201,7 +205,6 @@
           return urlDecoder;
       }
   
  -
       // -------------------- Request data --------------------
   
   
  @@ -358,6 +361,33 @@
       }
   
   
  +    // -------------------- Other attributes --------------------
  +    // We can use notes for most - need to discuss what is of general interest
  +    
  +    public void setAttribute( String name, Object o ) {
  +        attributes.put( name, o );
  +    }
  +
  +    public Hashtable getAttributes() {
  +        return attributes;
  +    }
  +
  +    public Object getAttribute(String name ) {
  +        return attributes.get(name);
  +    }
  +    
  +    public MessageBytes getRemoteUser() {
  +        return remoteUser;
  +    }
  +
  +    public MessageBytes getAuthType() {
  +        return authType;
  +    }
  +
  +    public MessageBytes getWorkerId() {
  +        return workerId;
  +    }
  +
       // -------------------- Input Buffer --------------------
   
   
  @@ -437,6 +467,10 @@
           remoteAddrMB.setString("127.0.0.1");
           remoteHostMB.setString("localhost");
   
  +        remoteUser.recycle();
  +        authType.recycle();
  +        workerId.recycle();
  +        attributes.clear();
       }
   
   
  
  
  

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

Reply via email to