bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / native / common / jk_worker_list.h
1 /*
2  *  Licensed to the Apache Software Foundation (ASF) under one or more
3  *  contributor license agreements.  See the NOTICE file distributed with
4  *  this work for additional information regarding copyright ownership.
5  *  The ASF licenses this file to You under the Apache License, Version 2.0
6  *  (the "License"); you may not use this file except in compliance with
7  *  the License.  You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  */
17
18 /***************************************************************************
19  * Description: Worker list                                                *
20  * Author:      Gal Shachor <shachor@il.ibm.com>                           *
21  * Author:      Henri Gomez <hgomez@apache.org>                            *
22  * Version:     $Revision: 466585 $                                           *
23  ***************************************************************************/
24
25 /*
26  * This file includes a list of all the possible workers in the jk library
27  * plus their factories. 
28  *
29  * If you want to add a worker just place it in the worker_factories array
30  * with its unique name and factory.
31  *
32  * If you want to remove a worker, hjust comment out its line in the 
33  * worker_factories array as well as its header file. For example, look
34  * at what we have done to the ajp23 worker.
35  *
36  * Note: This file should be included only in the jk_worker controller.
37  * Currently the jk_worker controller is located in jk_worker.c
38  */
39 #ifdef _PLACE_WORKER_LIST_HERE
40 #ifndef _JK_WORKER_LIST_H
41 #define _JK_WORKER_LIST_H
42
43 #include "jk_ajp12_worker.h"
44 #include "jk_ajp13_worker.h"
45 #include "jk_ajp14_worker.h"
46 #ifdef HAVE_JNI
47 #include "jk_jni_worker.h"
48 #endif
49 #include "jk_lb_worker.h"
50 #include "jk_status.h"
51
52 struct worker_factory_record
53 {
54     const char *name;
55     int        type;
56     worker_factory fac;
57 };
58 typedef struct worker_factory_record worker_factory_record_t;
59
60 static worker_factory_record_t worker_factories[] = {
61     /*
62      * AJPv12 worker, this is the stable worker.
63      */
64     {JK_AJP12_WORKER_NAME, JK_AJP12_WORKER_TYPE, ajp12_worker_factory},
65     /*
66      * AJPv13 worker, fast bi-directional worker.
67      */
68     {JK_AJP13_WORKER_NAME, JK_AJP13_WORKER_TYPE, ajp13_worker_factory},
69     /*
70      * AJPv14 worker, next generation fast bi-directional worker.
71      */
72     {JK_AJP14_WORKER_NAME, JK_AJP14_WORKER_TYPE, ajp14_worker_factory},
73     /*
74      * In process JNI based worker. Requires the server to be 
75      * multithreaded and to use native threads.
76      */
77 #ifdef HAVE_JNI
78     {JK_JNI_WORKER_NAME, JK_JNI_WORKER_TYPE, jni_worker_factory},
79 #endif
80     /*
81      * Load balancing worker. Performs round robin with sticky 
82      * session load balancing.
83      */
84     {JK_LB_WORKER_NAME, JK_LB_WORKER_TYPE, lb_worker_factory},
85
86     /*
87      * Status worker. Performs display display and
88      * worker management.
89      */
90     {JK_STATUS_WORKER_NAME, JK_STATUS_WORKER_TYPE, status_worker_factory},
91
92     /*
93      * Marks the end of the worker factory list.
94      */
95     {NULL, 0, NULL}
96 };
97 #endif /* _JK_WORKER_LIST_H */
98 #endif /* _PLACE_WORKER_LIST_HERE */