You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/12/13 20:06:12 UTC
cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_endpoint.h jk_service.h jk_worker.h
costin 01/12/13 11:06:12
Modified: jk/native2/include jk_endpoint.h jk_service.h jk_worker.h
Log:
Add the new methods, remove unused declarations, added few more comments.
Revision Changes Path
1.6 +3 -29 jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h
Index: jk_endpoint.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_endpoint.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- jk_endpoint.h 2001/12/12 22:00:06 1.5
+++ jk_endpoint.h 2001/12/13 19:06:11 1.6
@@ -61,7 +61,7 @@
* Author: Gal Shachor <sh...@il.ibm.com>
* Author: Dan Milstein <da...@shore.net>
* Author: Henri Gomez <hg...@slib.fr>
- * Version: $Revision: 1.5 $
+ * Version: $Revision: 1.6 $
***************************************************************************/
#ifndef JK_ENDPOINT_H
@@ -157,7 +157,8 @@
struct jk_msg *request; /* original request storage */
int uploadfd; /* future persistant storage id */
- int recoverable; /* if exchange could be conducted on another TC */
+ int recoverable; /* if exchange could be conducted on
+ another TC ??? */
/* For redirecting endpoints like lb */
jk_endpoint_t *realEndpoint;
@@ -169,10 +170,6 @@
char *servletContainerName;
- /* int (JK_METHOD *sendRequest)(jk_endpoint_t *e, */
- /* struct jk_ws_service *s, */
- /* jk_logger_t *l ); */
-
/*
* Forward a request to the servlet engine. The request is described
* by the jk_ws_service_t object. I'm not sure exactly how
@@ -199,29 +196,6 @@
int (JK_METHOD *done)(jk_endpoint_t **p,
jk_logger_t *l);
};
-
-int ajp_get_endpoint(struct jk_worker *pThis,
- jk_endpoint_t **pend,
- jk_logger_t *l,
- int proto);
-
-int ajp_connect_to_endpoint(jk_endpoint_t *ae,
- jk_logger_t *l);
-
-void ajp_close_endpoint(jk_endpoint_t *ae,
- jk_logger_t *l);
-
-int ajp_send_request(jk_endpoint_t *e,
- struct jk_ws_service *s,
- jk_logger_t *l);
-
-int ajp_get_reply(jk_endpoint_t *e,
- struct jk_ws_service *s,
- jk_logger_t *l);
-
-void ajp_reset_endpoint(jk_endpoint_t *ae);
-
-
#ifdef __cplusplus
}
1.5 +10 -1 jakarta-tomcat-connectors/jk/native2/include/jk_service.h
Index: jk_service.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_service.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- jk_service.h 2001/12/12 22:02:30 1.4
+++ jk_service.h 2001/12/13 19:06:11 1.5
@@ -63,7 +63,7 @@
* Author: Gal Shachor <sh...@il.ibm.com> *
* Author: Dan Milstein <da...@shore.net> *
* Author: Henri Gomez <hg...@slib.fr> *
- * Version: $Revision: 1.4 $ *
+ * Version: $Revision: 1.5 $ *
***************************************************************************/
#ifndef JK_SERVICE_H
@@ -233,6 +233,15 @@
* and JK_FALSE on failure.
*/
+ /* Initialize the service structure
+ */
+ int (*init)( jk_ws_service_t *_this,
+ struct jk_endpoint *e, void *serverObj);
+
+ /* Post request cleanup.
+ */
+ void (*afterRequest)( jk_ws_service_t *_this );
+
/*
* Send the response headers to the browser.
*/
1.7 +30 -17 jakarta-tomcat-connectors/jk/native2/include/jk_worker.h
Index: jk_worker.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_worker.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- jk_worker.h 2001/12/12 22:01:49 1.6
+++ jk_worker.h 2001/12/13 19:06:11 1.7
@@ -58,7 +58,7 @@
/***************************************************************************
* Description: Workers controller header file *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.6 $ *
+ * Version: $Revision: 1.7 $ *
***************************************************************************/
#ifndef JK_WORKER_H
@@ -196,39 +196,52 @@
* Given a worker which is in the process of being created, and a list
* of configuration options (or 'properties'), check to see if it the
* options are. This will always be called before the init() method.
- * The init/validate distinction is a bit hazy to me.
- * See jk_ajp13_worker.c/jk_ajp14_worker.c and jk_worker.c->wc_create_worker()
+ *
+ * This is different from init - see the apache config process.
+ * Validate should only do static checks on data ( if it has all
+ * the info it needs and if it's valid ). Init() can do any
+ * 'active' opertions.
+ *
+ * You can skip this by setting it to NULL.
*/
int (JK_METHOD *validate)(jk_worker_t *_this,
- jk_map_t *props,
+ jk_map_t *props,
struct jk_workerEnv *we,
- jk_logger_t *l);
+ jk_logger_t *l);
/*
* Do whatever initialization needs to be done to start this worker up.
* Configuration options are passed in via the props parameter.
*/
- int (JK_METHOD *init)(jk_worker_t *w,
- jk_map_t *props,
+ int (JK_METHOD *init)(jk_worker_t *_this,
+ jk_map_t *props,
struct jk_workerEnv *we,
- jk_logger_t *l);
-
+ jk_logger_t *l );
/*
* Obtain an endpoint to service a particular request. A pointer to
- * the endpoint is stored in pend.
+ * the endpoint is stored in pend. The done() method in the
+ * endpoint will be called when the endpoint is no longer needed.
*/
- int (JK_METHOD *get_endpoint)(jk_worker_t *w,
+ int (JK_METHOD *get_endpoint)(jk_worker_t *_this,
struct jk_endpoint **pend,
- jk_logger_t *l);
+ jk_logger_t *l );
+ /*
+ * Called when this particular endpoint has finished processing a
+ * request. For some protocols (e.g. ajp12), this frees the memory
+ * associated with the endpoint. For others (e.g. ajp13/ajp14), this can
+ * return the endpoint to a cache of already opened endpoints.
+ */
+/* int (JK_METHOD *done)(jk_env_t *env, */
+/* jk_worker_t *_this, */
+/* struct jk_endpoint *p ); */
+
+
/*
- * Shutdown this worker. The first argument is not a 'this' pointer,
- * but rather a pointer to 'this', so that the object can be free'd (I
- * think -- though that doesn't seem to be happening. Hmmm).
+ * Shutdown this worker.
*/
- int (JK_METHOD *destroy)(jk_worker_t **w,
- jk_logger_t *l);
+ int (JK_METHOD *destroy)(jk_worker_t **_thisP, jk_logger_t *l );
};
#ifdef __cplusplus
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>