00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_HTTP_SVR_THREAD_H
00018 #define AXIS2_HTTP_SVR_THREAD_H
00019
00031 #include <axis2_const.h>
00032 #include <axis2_defines.h>
00033 #include <axis2_env.h>
00034 #include <axis2_http_worker.h>
00035
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040
00042 typedef struct axis2_http_svr_thread_ops axis2_http_svr_thread_ops_t;
00044 typedef struct axis2_http_svr_thread axis2_http_svr_thread_t;
00045
00046 extern int axis2_http_socket_read_timeout;
00047
00052 struct axis2_http_svr_thread_ops
00053 {
00058 axis2_status_t (AXIS2_CALL *
00059 run)(
00060 axis2_http_svr_thread_t *svr_thread,
00061 const axis2_env_t *env);
00062
00067 axis2_status_t (AXIS2_CALL *
00068 destroy)(
00069 axis2_http_svr_thread_t *svr_thread,
00070 const axis2_env_t *env);
00071
00076 int (AXIS2_CALL *
00077 get_local_port)(
00078 const axis2_http_svr_thread_t *svr_thread,
00079 const axis2_env_t *env);
00080
00085 axis2_bool_t (AXIS2_CALL *
00086 is_running)(
00087 axis2_http_svr_thread_t *svr_thread,
00088 const axis2_env_t *env);
00089
00095 axis2_status_t (AXIS2_CALL *
00096 set_worker)(
00097 axis2_http_svr_thread_t *svr_thread,
00098 const axis2_env_t *env,
00099 axis2_http_worker_t *worker);
00100
00105 axis2_status_t (AXIS2_CALL *
00106 free)(
00107 axis2_http_svr_thread_t *svr_thread,
00108 const axis2_env_t *env);
00109 };
00110
00114 struct axis2_http_svr_thread
00115 {
00117 axis2_http_svr_thread_ops_t *ops;
00118 };
00119
00124 AXIS2_EXTERN axis2_http_svr_thread_t *AXIS2_CALL
00125 axis2_http_svr_thread_create (
00126 const axis2_env_t *env,
00127 int port);
00128
00129
00130
00133 #define AXIS2_HTTP_SVR_THREAD_RUN(svr_thread, env) \
00134 ((svr_thread)->ops->run(svr_thread, env))
00135
00138 #define AXIS2_HTTP_SVR_THREAD_DESTROY(svr_thread, env) \
00139 ((svr_thread)->ops->destroy(svr_thread, env))
00140
00143 #define AXIS2_HTTP_SVR_THREAD_GET_LOCAL_PORT(svr_thread, env) \
00144 ((svr_thread)->ops->get_local_port(svr_thread,\
00145 env))
00146
00149 #define AXIS2_HTTP_SVR_THREAD_IS_RUNNING(svr_thread, env) \
00150 ((svr_thread)->ops->is_running(svr_thread, env))
00151
00154 #define AXIS2_HTTP_SVR_THREAD_SET_WORKER(svr_thread, env, worker) \
00155 ((svr_thread)->ops->set_worker(svr_thread, env,\
00156 worker))
00157
00160 #define AXIS2_HTTP_SVR_THREAD_FREE(svr_thread, env) \
00161 ((svr_thread)->ops->free(svr_thread, env))
00162
00163
00164
00166 #ifdef __cplusplus
00167 }
00168 #endif
00169
00170 #endif