cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2005-05-15 Thread billbarker
billbarker2005/05/15 21:58:00

  Modified:coyote/src/java/org/apache/coyote ActionCode.java
  Log:
  Add action code for FORM replay
  
  Revision  ChangesPath
  1.17  +7 -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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ActionCode.java   24 Feb 2004 08:54:29 -  1.16
  +++ ActionCode.java   16 May 2005 04:58:00 -  1.17
  @@ -118,6 +118,13 @@
**/
   public static final ActionCode ACTION_REQ_LOCAL_NAME_ATTRIBUTE = new 
ActionCode(19);
   
  +
  +/**
  + * Callback for setting FORM auth body replay
  + */
  +public static final ActionCode ACTION_REQ_SET_BODY_REPLAY = new 
ActionCode(20);
  +
  +
   // --- 
Constructors
   int code;
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2003-10-01 Thread hgomez
hgomez  2003/10/01 00:50:29

  Modified:coyote/src/java/org/apache/coyote ActionCode.java
  Log:
  Fix description
  
  Revision  ChangesPath
  1.13  +2 -2  
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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ActionCode.java   10 Jan 2003 10:21:34 -  1.12
  +++ ActionCode.java   1 Oct 2003 07:50:29 -   1.13
  @@ -107,14 +107,14 @@
   public static final ActionCode ACTION_POST_REQUEST = new ActionCode(10);
   
   /**
  - * Callback for lazy evaluation - extract the remote host name.
  + * Callback for lazy evaluation - extract the remote host address.
*/
   public static final ActionCode ACTION_REQ_HOST_ATTRIBUTE = 
   new ActionCode(11);
   
   
   /**
  - * Callback for lazy evaluation - extract the SSL-related attributes.
  + * Callback for lazy evaluation - extract the remote host infos (address, name, 
port) and local address.
*/
   public static final ActionCode ACTION_REQ_HOST_ADDR_ATTRIBUTE = new 
ActionCode(12);
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2003-01-10 Thread remm
remm2003/01/10 02:21:34

  Modified:coyote/src/java/org/apache/coyote ActionCode.java
  Log:
  - Fix code number.
  
  Revision  ChangesPath
  1.12  +1 -1  
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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ActionCode.java   4 Dec 2002 23:33:27 -   1.11
  +++ ActionCode.java   10 Jan 2003 10:21:34 -  1.12
  @@ -134,7 +134,7 @@
* 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(14);
  +public static final ActionCode ACTION_REQ_SSL_CERTIFICATE = new ActionCode(15);
   
   
   // --- Constructors
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2002-12-04 Thread costin
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  ChangesPath
  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 -  1.10
  +++ ActionCode.java   4 Dec 2002 23:33:27 -   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:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2002-09-20 Thread billbarker

billbarker2002/09/20 21:45:35

  Modified:coyote/src/java/org/apache/coyote ActionCode.java
  Log:
  Add an Action to force getting the SSL client-cert.
  
  Revision  ChangesPath
  1.9   +6 -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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ActionCode.java   20 Jun 2002 18:53:44 -  1.8
  +++ ActionCode.java   21 Sep 2002 04:45:35 -  1.9
  @@ -117,6 +117,12 @@
*/
   public static final ActionCode ACTION_REQ_SSL_ATTRIBUTE = new ActionCode();
   
  +/**
  + * 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();
  +
   
   // --- Constructors
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2002-04-09 Thread remm

remm02/04/09 02:23:40

  Modified:coyote/src/java/org/apache/coyote ActionCode.java
  Log:
  - Coding style cleanup.
  
  Revision  ChangesPath
  1.6   +8 -3  
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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ActionCode.java   8 Apr 2002 22:46:58 -   1.5
  +++ ActionCode.java   9 Apr 2002 09:23:40 -   1.6
  @@ -90,11 +90,16 @@
   
   public static final ActionCode ACTION_STOP = new ActionCode();
   
  -/** Callback for lazy evaluation - extract the remote host address
  +
  +/**
  + * Callback for lazy evaluation - extract the remote host address.
*/
  -public static final ActionCode ACTION_REQ_HOST_ATTRIBUTE = new ActionCode();
  +public static final ActionCode ACTION_REQ_HOST_ATTRIBUTE = 
  +new ActionCode();
  +
   
  -/** Callback for lazy evaluation - extract the SSL-related attributes
  +/**
  + * Callback for lazy evaluation - extract the SSL-related attributes.
*/
   public static final ActionCode ACTION_REQ_SSL_ATTRIBUTE = new ActionCode();
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2002-04-08 Thread costin

costin  02/04/08 15:46:58

  Modified:coyote/src/java/org/apache/coyote ActionCode.java
  Log:
  Add the 2 callbacks that are typically needed - one to compute the remote host
  and the other for ssl attributes.
  
  Both are expensive and should be done on-demand
  
  Revision  ChangesPath
  1.5   +6 -2  
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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ActionCode.java   5 Apr 2002 05:36:32 -   1.4
  +++ ActionCode.java   8 Apr 2002 22:46:58 -   1.5
  @@ -90,9 +90,13 @@
   
   public static final ActionCode ACTION_STOP = new ActionCode();
   
  -/** Compute request attribute
  +/** Callback for lazy evaluation - extract the remote host address
*/
  -public static final ActionCode ACTION_REQ_ATTRIBUTE = new ActionCode();
  +public static final ActionCode ACTION_REQ_HOST_ATTRIBUTE = new ActionCode();
  +
  +/** Callback for lazy evaluation - extract the SSL-related attributes
  + */
  +public static final ActionCode ACTION_REQ_SSL_ATTRIBUTE = new ActionCode();
   
   
   // --- Constructors
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2002-04-04 Thread costin

costin  02/04/04 21:36:32

  Modified:coyote/src/java/org/apache/coyote ActionCode.java
  Log:
  Added an action code for 'getAttribute'
  
  We need to be able to get various expensive attributes from the lower
  layer - like SSL info.
  
  Unfortunately the current Action can't return values - if we move to
  the new TcHandler it'll be much easier.
  
  Remy, am I missing something ?
  
  Revision  ChangesPath
  1.4   +4 -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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ActionCode.java   15 Mar 2002 05:31:50 -  1.3
  +++ ActionCode.java   5 Apr 2002 05:36:32 -   1.4
  @@ -90,6 +90,10 @@
   
   public static final ActionCode ACTION_STOP = new ActionCode();
   
  +/** Compute request attribute
  + */
  +public static final ActionCode ACTION_REQ_ATTRIBUTE = new ActionCode();
  +
   
   // --- Constructors
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2001-09-30 Thread Remy Maucherat

> Hi Remy,
>
> Can you explain a bit what's this ActionCode ? I understant it as a hook
> mechanism, and I like that - but I'm not sure I like the implementation.
>
> For example, any reason not to use a plain 'int' as action code ? At least
> that would allow switch() which is slightly faster ( when the number of
> actions will grow ).
>
> Also, how do you plan to 'grow' - you can't just add static fields - what
> about dynamic hook ? If you allow ActionCodes that are not defined as
> static fields ( so you can use == ), you'll be forced to use .equals(),
> that would be pretty bad.

Ok. The "action" thing is not a generic event mechanism. Remember, the name
was listener, but you complained about that, and I changed it. The point is
just to be able to expose a bit the underlying connection control. The event
/ hook / handler / valve / interceptor is on the application side, and is
something else altogether. Do I need to change the name again ?

The main need for that is to allow the servlet container to tell the
connector that the request has been accepted and is ready to be processed
(it's the HTTP/1.1 100 status code). I then added some additional code which
mat also be useful.

So since it's meant for connection control only, very little, if any,
extensibility is needed (there's the "custom" type if you really need it,
though).

Note: I don't see why ints would be faster. The reference comparison should
be a pointer comparison, which is checking if two ints are equal.

It's all about modularity: here, I'm not trying to replicate all the
functionality of, for example, the connector package of Catalina. Coyote and
its connectors are supposed to be dumb : parse the request, enforce the
protocol on the response, handle the underlying connection. Of course,
that's already quite an important responsability.
Then, the Adapter is doing the application specific logic (note: I probably
still need to remove a few things from the Request and Response).
To compare it with the Tomcat 3.3 core, I would say that the Adapter would
be some code from Request and Response + the OutputBuffer (which I plan to
reuse - although I'll modify it a bit).

> There are few other things we need to discuss before implementing - but
> that's one of the most obvious.
>
> ( I'm not saying that Hooks are better, just that we need to discuss a bit
> the details of coyote )

No, Hooks / Valves / ... are something totally different. I don't plan to
replace or remove them.

Remy




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java

2001-09-30 Thread remm

remm01/09/30 18:09:54

  Modified:coyote/src/java/org/apache/coyote ActionCode.java
  Log:
  - Add a commit action code.
  
  Revision  ChangesPath
  1.2   +6 -3  
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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ActionCode.java   2001/07/10 02:54:59 1.1
  +++ ActionCode.java   2001/10/01 01:09:54 1.2
  @@ -70,16 +70,19 @@
   // -- Constants
   
   
  -public static final ActionCode ACTION_CUSTOM = new ActionCode();
  +public static final ActionCode ACTION_ACK = new ActionCode();
   
   
   public static final ActionCode ACTION_CLOSE = new ActionCode();
   
   
  -public static final ActionCode ACTION_RESET = new ActionCode();
  +public static final ActionCode ACTION_COMMIT = new ActionCode();
   
   
  -public static final ActionCode ACTION_ACK = new ActionCode();
  +public static final ActionCode ACTION_CUSTOM = new ActionCode();
  +
  +
  +public static final ActionCode ACTION_RESET = new ActionCode();
   
   
   // --- Constructors
  
  
  



cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java ActionHook.java OutputBuffer.java Request.java Response.java AdapterEventCode.java AdapterListener.java Note.java

2001-07-09 Thread remm

remm01/07/09 19:55:05

  Modified:coyote/src/java/org/apache/coyote OutputBuffer.java
Request.java Response.java
  Added:   coyote/src/java/org/apache/coyote ActionCode.java
ActionHook.java
  Removed: coyote/src/java/org/apache/coyote AdapterEventCode.java
AdapterListener.java Note.java
  Log:
  - Various updates to the Coyote API.
Note: The API can't be considered frozen until the port of at least one
connector is complete.
  - Status update : I have started porting the Java HTTP/1.1 connector.
I will patially rewrite it for more memory efficiency and a few additional
features.
  - On the adapter side, I'll write a simple adapter which will output the full
request information back to the client, and then I'll write an adapter
for Catalina.
  
  Revision  ChangesPath
  1.2   +0 -6  
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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OutputBuffer.java 2001/06/14 01:07:57 1.1
  +++ OutputBuffer.java 2001/07/10 02:55:01 1.2
  @@ -73,10 +73,4 @@
   throws IOException;
   
   
  -public void reset();
  -
  -
  -public void close();
  -
  -
   }
  
  
  
  1.2   +3 -8  
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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Request.java  2001/06/14 01:07:57 1.1
  +++ Request.java  2001/07/10 02:55:02 1.2
  @@ -153,7 +153,7 @@
   /**
* Notes.
*/
  -protected Note notes[] = new Note[Constants.MAX_NOTES];
  +protected Object notes[] = new Object[Constants.MAX_NOTES];
   
   
   /**
  @@ -349,12 +349,12 @@
   //  Per-Request "notes" 
   
   
  -public final void setNote(int pos, Note value) {
  +public final void setNote(int pos, Object value) {
notes[pos] = value;
   }
   
   
  -public final Note getNote(int pos) {
  +public final Object getNote(int pos) {
return notes[pos];
   }
   
  @@ -378,11 +378,6 @@
   serverPort=-1;

scookies.recycle();
  -
  -for (int i=0; i < Constants.MAX_NOTES; i++) {
  -if (notes[i] != null)
  -notes[i].recycle();
  -}
   
   unparsedURIMB.recycle();
   uriMB.recycle();
  
  
  
  1.2   +21 -23
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java
  
  Index: Response.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Response.java 2001/06/14 01:07:57 1.1
  +++ Response.java 2001/07/10 02:55:02 1.2
  @@ -111,7 +111,7 @@
   /**
* Notes.
*/
  -protected Note notes[] = new Note[Constants.MAX_NOTES];
  +protected Object notes[] = new Object[Constants.MAX_NOTES];
   
   
   /**
  @@ -136,9 +136,9 @@
   
   
   /**
  - * Adapter listener.
  + * Action hook.
*/
  -public AdapterListener listener;
  +public ActionHook hook;
   
   
   // - Properties
  @@ -159,35 +159,35 @@
   }
   
   
  -public AdapterListener getListener() {
  -return listener;
  +public ActionHook getHook() {
  +return hook;
   }
   
   
  -public void setAdapterListener(AdapterListener listener) {
  -this.listener = listener;
  +public void setHook(ActionHook hook) {
  +this.hook = hook;
   }
   
   
   //  Per-Response "notes" 
   
   
  -public final void setNote(int pos, Note value) {
  +public final void setNote(int pos, Object value) {
notes[pos] = value;
   }
   
   
  -public final Note getNote(int pos) {
  +public final Object getNote(int pos) {
return notes[pos];
   }
   
   
  -//  Events 
  +//  Actions 
   
   
  -public void sendEvent(AdapterEventCode eventCode, Object param) {
  -if (listener != null) {
  -listener.event(eventCode, param);
  +public void action(ActionCode actionCode, Object param) {
  +if (hook != null) {