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 2002/02/28 23:08:21 UTC
cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_uriMap.h jk_workerEnv.h
costin 02/02/28 14:08:21
Modified: jk/native2/include jk_uriMap.h jk_workerEnv.h
Log:
Few more changes in cleaning up the uri mapping and config.
Revision Changes Path
1.8 +5 -0 jakarta-tomcat-connectors/jk/native2/include/jk_uriMap.h
Index: jk_uriMap.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_uriMap.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- jk_uriMap.h 16 Dec 2001 23:17:23 -0000 1.7
+++ jk_uriMap.h 28 Feb 2002 22:08:21 -0000 1.8
@@ -115,6 +115,11 @@
void (*destroy)( struct jk_env *env, jk_uriMap_t *_this );
+ struct jk_uriEnv *(*createUriEnv)(struct jk_env *env,
+ struct jk_uriMap *_this,
+ const char *vhost,
+ const char *name );
+
/** Add a servlet mapping. Can be done before init()
*/
jk_uriEnv_t *(*addMapping)( struct jk_env *env, jk_uriMap_t *_this,
1.11 +42 -18 jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
Index: jk_workerEnv.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- jk_workerEnv.h 6 Feb 2002 19:19:16 -0000 1.10
+++ jk_workerEnv.h 28 Feb 2002 22:08:21 -0000 1.11
@@ -58,7 +58,7 @@
/***************************************************************************
* Description: Workers controller header file *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.10 $ *
+ * Version: $Revision: 1.11 $ *
***************************************************************************/
#ifndef JK_WORKERENV_H
@@ -69,7 +69,7 @@
#include "jk_worker.h"
#include "jk_map.h"
#include "jk_uriMap.h"
-#include "jk_webapp.h"
+#include "jk_uriEnv.h"
#include "jk_handler.h"
#include "jk_service.h"
#include "jk_vm.h"
@@ -82,7 +82,7 @@
struct jk_endpoint;
struct jk_env;
struct jk_uriMap;
-struct jk_webapp;
+struct jk_uriEnv;
struct jk_map;
struct jk_logger;
struct jk_handler;
@@ -129,7 +129,10 @@
/** Initialization properties, set via native options or workers.properties.
*/
- struct jk_map *init_data;
+ /* XXX renamed from init_data to force all code to use setProperty
+ This is private property !
+ */
+ struct jk_map *initData;
/** Root env, used to register object types, etc
*/
@@ -141,18 +144,12 @@
char *log_file;
int log_level;
- /*
- * Worker stuff
- */
- char *worker_file;
-
char *secret_key;
/* jk_map_t *automount; */
struct jk_uriMap *uriMap;
- struct jk_webapp *rootWebapp;
- struct jk_map *webapps;
+ struct jk_uriEnv *rootWebapp;
/** If 'global' server mappings will be visible in virtual hosts
as well. XXX Not sure this is needed
@@ -205,6 +202,38 @@
void *_private;
/* -------------------- Methods -------------------- */
+ /** Set a jk property. This is similar with the mechanism
+ * used by java side ( with individual setters for
+ * various properties ), except we use a single method
+ * and a big switch
+ *
+ * As in java beans, setting a property may have side effects
+ * like changing the log level or reading a secondary
+ * properties file.
+ *
+ * Changing a property at runtime will also be supported for
+ * some properties.
+ * XXX Document supported properties as part of
+ * workers.properties doc.
+ * XXX Implement run-time change in the status/ctl workers.
+ */
+ int (*setProperty)( struct jk_env *env,
+ struct jk_workerEnv *_this,
+ const char *name, char *value);
+
+ char *(*getProperty)( struct jk_env *env,
+ struct jk_workerEnv *_this,
+ const char *name);
+
+ /** Return a list of supported properties.
+ Not all properties can be set ( some may be runtime
+ status ).
+ @experimental This is not a final API, I would use
+ an external config ( DTD/schema or even MIB-like ? )
+ */
+ char **(*getPropertyNames)( struct jk_env *env,
+ struct jk_workerEnv *_this );
+
/** Get worker by name
*/
@@ -218,12 +247,6 @@
const char *name,
struct jk_map *init_data);
- struct jk_webapp *(*createWebapp)(struct jk_env *env,
- struct jk_workerEnv *_this,
- const char *vhost,
- const char *name,
- struct jk_map *init_data);
-
/** Call the handler associated with the message type.
*/
int (*dispatch)(struct jk_env *env, struct jk_workerEnv *_this,
@@ -242,7 +265,8 @@
struct jk_ws_service *r );
/**
- * Init the workers, prepare the worker environment.
+ * Init the workers, prepare the worker environment. Will read
+ * all properties and set the jk acordignly.
*
* Replaces wc_open
*/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>