00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_HTTP_SVR_THREAD_H
00019 #define AXIS2_HTTP_SVR_THREAD_H
00020
00032 #include <axis2_const.h>
00033 #include <axis2_defines.h>
00034 #include <axis2_env.h>
00035 #include <axis2_http_worker.h>
00036
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041
00043 typedef struct axis2_http_svr_thread_ops axis2_http_svr_thread_ops_t;
00045 typedef struct axis2_http_svr_thread axis2_http_svr_thread_t;
00046
00047 extern int axis2_http_socket_read_timeout;
00048
00053 struct axis2_http_svr_thread_ops
00054 {
00059 axis2_status_t (AXIS2_CALL *
00060 run)(
00061 axis2_http_svr_thread_t *svr_thread,
00062 const axis2_env_t *env);
00063
00068 axis2_status_t (AXIS2_CALL *
00069 destroy)(
00070 axis2_http_svr_thread_t *svr_thread,
00071 const axis2_env_t *env);
00072
00077 int (AXIS2_CALL *
00078 get_local_port)(
00079 const axis2_http_svr_thread_t *svr_thread,
00080 const axis2_env_t *env);
00081
00086 axis2_bool_t (AXIS2_CALL *
00087 is_running)(
00088 axis2_http_svr_thread_t *svr_thread,
00089 const axis2_env_t *env);
00090
00096 axis2_status_t (AXIS2_CALL *
00097 set_worker)(
00098 axis2_http_svr_thread_t *svr_thread,
00099 const axis2_env_t *env,
00100 axis2_http_worker_t *worker);
00101
00106 axis2_status_t (AXIS2_CALL *
00107 free)(
00108 axis2_http_svr_thread_t *svr_thread,
00109 const axis2_env_t *env);
00110 };
00111
00115 struct axis2_http_svr_thread
00116 {
00118 axis2_http_svr_thread_ops_t *ops;
00119 };
00120
00125 AXIS2_EXTERN axis2_http_svr_thread_t *AXIS2_CALL
00126 axis2_http_svr_thread_create (
00127 const axis2_env_t *env,
00128 int port);
00129
00130
00131
00134 #define AXIS2_HTTP_SVR_THREAD_RUN(svr_thread, env) \
00135 ((svr_thread)->ops->run(svr_thread, env))
00136
00139 #define AXIS2_HTTP_SVR_THREAD_DESTROY(svr_thread, env) \
00140 ((svr_thread)->ops->destroy(svr_thread, env))
00141
00144 #define AXIS2_HTTP_SVR_THREAD_GET_LOCAL_PORT(svr_thread, env) \
00145 ((svr_thread)->ops->get_local_port(svr_thread,\
00146 env))
00147
00150 #define AXIS2_HTTP_SVR_THREAD_IS_RUNNING(svr_thread, env) \
00151 ((svr_thread)->ops->is_running(svr_thread, env))
00152
00155 #define AXIS2_HTTP_SVR_THREAD_SET_WORKER(svr_thread, env, worker) \
00156 ((svr_thread)->ops->set_worker(svr_thread, env,\
00157 worker))
00158
00161 #define AXIS2_HTTP_SVR_THREAD_FREE(svr_thread, env) \
00162 ((svr_thread)->ops->free(svr_thread, env))
00163
00164
00165
00167 #ifdef __cplusplus
00168 }
00169 #endif
00170
00171 #endif