2
* Copyright 1999-2004 The Apache Software Foundation
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
17
/***************************************************************************
18
* Description: Various utility functions *
19
* Author: Gal Shachor <shachor@il.ibm.com> *
20
* Author: Henri Gomez <hgomez@apache.org> *
21
* Version: $Revision: 1.34 $ *
22
***************************************************************************/
26
#include "jk_global.h"
29
#include "jk_logger.h"
30
#include "jk_service.h"
32
int jk_parse_log_level(const char *level);
34
int jk_open_file_logger(jk_logger_t **l, const char *file, int level);
36
int jk_close_file_logger(jk_logger_t **l);
38
int jk_log(jk_logger_t *l,
39
const char *file, int line, const char *funcname, int level,
40
const char *fmt, ...);
42
/* [V] Two general purpose functions. Should ease the function bloat. */
43
int jk_get_worker_str_prop(jk_map_t *m,
44
const char *wname, const char *pname, const char **prop);
46
int jk_get_worker_int_prop(jk_map_t *m,
47
const char *wname, const char *pname, int *prop);
49
const char *jk_get_worker_host(jk_map_t *m, const char *wname, const char *def);
51
const char *jk_get_worker_type(jk_map_t *m, const char *wname);
53
int jk_get_worker_port(jk_map_t *m, const char *wname, int def);
55
int jk_get_worker_cache_size(jk_map_t *m, const char *wname, int def);
57
int jk_get_worker_socket_timeout(jk_map_t *m, const char *wname, int def);
59
int jk_get_worker_socket_buffer(jk_map_t *m, const char *wname, int def);
61
int jk_get_worker_socket_keepalive(jk_map_t *m, const char *wname, int def);
63
int jk_get_worker_cache_timeout(jk_map_t *m, const char *wname, int def);
65
int jk_get_worker_recovery_opts(jk_map_t *m, const char *wname, int def);
67
int jk_get_worker_connect_timeout(jk_map_t *m, const char *wname, int def);
69
int jk_get_worker_reply_timeout(jk_map_t *m, const char *wname, int def);
71
int jk_get_worker_prepost_timeout(jk_map_t *m, const char *wname, int def);
73
int jk_get_worker_recycle_timeout(jk_map_t *m, const char *wname, int def);
75
int jk_get_worker_recover_timeout(jk_map_t *m, const char *wname, int def);
77
const char *jk_get_worker_domain(jk_map_t *m, const char *wname, const char *def);
79
const char *jk_get_worker_redirect(jk_map_t *m, const char *wname, const char *def);
81
const char *jk_get_worker_secret_key(jk_map_t *m, const char *wname);
83
int jk_get_worker_retries(jk_map_t *m, const char *wname, int def);
85
int jk_get_is_worker_disabled(jk_map_t *m, const char *wname);
87
int jk_get_is_worker_stopped(jk_map_t *m, const char *wname);
89
void jk_set_log_format(const char *logformat);
91
int jk_get_worker_list(jk_map_t *m, char ***list, unsigned *num_of_wokers);
93
int jk_get_lb_factor(jk_map_t *m, const char *wname);
95
int jk_get_is_sticky_session(jk_map_t *m, const char *wname);
97
int jk_get_is_sticky_session_force(jk_map_t *m, const char *wname);
99
int jk_get_lb_method(jk_map_t *m, const char *wname);
101
int jk_get_lb_lock(jk_map_t *m, const char *wname);
103
int jk_get_lb_worker_list(jk_map_t *m,
104
const char *lb_wname,
105
char ***list, unsigned int *num_of_wokers);
106
int jk_get_worker_mount_list(jk_map_t *m,
108
char ***list, unsigned int *num_of_maps);
109
const char *jk_get_worker_secret(jk_map_t *m, const char *wname);
111
int jk_get_worker_mx(jk_map_t *m, const char *wname, unsigned *mx);
113
int jk_get_worker_ms(jk_map_t *m, const char *wname, unsigned *ms);
115
int jk_get_worker_classpath(jk_map_t *m, const char *wname, const char **cp);
118
int jk_get_worker_bridge_type(jk_map_t *m, const char *wname, unsigned *bt);
120
int jk_get_worker_jvm_path(jk_map_t *m, const char *wname, const char **vm_path);
122
int jk_get_worker_callback_dll(jk_map_t *m,
123
const char *wname, const char **cb_path);
125
int jk_get_worker_cmd_line(jk_map_t *m, const char *wname, const char **cmd_line);
127
int jk_file_exists(const char *f);
129
int jk_is_path_poperty(const char *prp_name);
131
int jk_is_cmd_line_poperty(const char *prp_name);
133
int jk_is_unique_property(const char *prp_name);
135
int jk_get_worker_stdout(jk_map_t *m, const char *wname, const char **stdout_name);
137
int jk_get_worker_stderr(jk_map_t *m, const char *wname, const char **stderr_name);
139
int jk_get_worker_sysprops(jk_map_t *m, const char *wname, const char **sysprops);
141
int jk_get_worker_libpath(jk_map_t *m, const char *wname, const char **libpath);
143
char **jk_parse_sysprops(jk_pool_t *p, const char *sysprops);
146
void jk_append_libpath(jk_pool_t *p, const char *libpath);
148
void jk_set_worker_def_cache_size(int sz);
150
int jk_get_worker_def_cache_size(int protocol);
152
int jk_get_worker_maintain_time(jk_map_t *m);
154
#define TC32_BRIDGE_TYPE 32
155
#define TC33_BRIDGE_TYPE 33
156
#define TC40_BRIDGE_TYPE 40
157
#define TC41_BRIDGE_TYPE 41
158
#define TC50_BRIDGE_TYPE 50
163
#endif /* __cplusplus */
168
#endif /* __cplusplus */
169
#endif /* _JK_UTIL_H */