You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/07/07 01:37:16 UTC
svn commit: r419742 - in /webservices/axis2/trunk/c: include/axis2_msg_ctx.h
modules/core/context/msg_ctx.c modules/core/engine/Makefile.am
Author: samisa
Date: Thu Jul 6 16:37:15 2006
New Revision: 419742
URL: http://svn.apache.org/viewvc?rev=419742&view=rev
Log:
Added executaion chain and current handler chain related stuff.
Also fixed the install problem of engine header
Modified:
webservices/axis2/trunk/c/include/axis2_msg_ctx.h
webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
webservices/axis2/trunk/c/modules/core/engine/Makefile.am
Modified: webservices/axis2/trunk/c/include/axis2_msg_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_msg_ctx.h?rev=419742&r1=419741&r2=419742&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_ctx.h Thu Jul 6 16:37:15 2006
@@ -687,6 +687,33 @@
axis2_msg_ctx_t *msg_ctx,
const axis2_env_t *env,
struct axis2_options *options);
+
+ axis2_status_t (AXIS2_CALL *
+ set_execution_chain)(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ axis2_array_list_t *execution_chain);
+
+ axis2_array_list_t *(AXIS2_CALL *
+ get_execution_chain)(const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
+
+ axis2_status_t (AXIS2_CALL *
+ set_current_handler_index)(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ const int index);
+
+ int (AXIS2_CALL *
+ get_current_handler_index)(const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
+
+ axis2_status_t (AXIS2_CALL *
+ set_current_phase_index)(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ const int index);
+
+ int (AXIS2_CALL *
+ get_current_phase_index)(const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
};
/**
@@ -956,6 +983,24 @@
#define AXIS2_MSG_CTX_SET_OPTIONS(msg_ctx, env, options) \
((msg_ctx)->ops->set_options(msg_ctx, env, options))
+
+#define AXIS2_MSG_CTX_SET_EXECUTION_CHAIN(msg_ctx, env, chain) \
+ ((msg_ctx)->ops->set_execution_chain(msg_ctx, env, chain))
+
+#define AXIS2_MSG_CTX_GET_EXECUTION_CHAIN(msg_ctx, env) \
+ ((msg_ctx)->ops->get_execution_chain(msg_ctx, env))
+
+#define AXIS2_MSG_CTX_SET_CURRENT_HANDLER_INDEX(msg_ctx, env, index) \
+ ((msg_ctx)->ops->set_current_handler_index(msg_ctx, env, index))
+
+#define AXIS2_MSG_CTX_GET_CURRENT_HANDLER_INDEX(msg_ctx, env) \
+ ((msg_ctx)->ops->get_current_handler_index(msg_ctx, env))
+
+#define AXIS2_MSG_CTX_SET_CURRENT_PHASE_INDEX(msg_ctx, env, index) \
+ ((msg_ctx)->ops->set_current_phase_index(msg_ctx, env, index))
+
+#define AXIS2_MSG_CTX_GET_CURRENT_PHASE_INDEX(msg_ctx, env) \
+ ((msg_ctx)->ops->get_current_phase_index(msg_ctx, env))
/************************** End of function macros ****************************/
Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?rev=419742&r1=419741&r2=419742&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Thu Jul 6 16:37:15 2006
@@ -111,6 +111,12 @@
axis2_qname_t *svc_qname;
/** op qname */
axis2_qname_t *op_qname;
+ /** The chain of Handlers/Phases for processing this message */
+ axis2_array_list_t *execution_chain;
+ /** Index into the execution chain of the currently executing handler */
+ int current_handler_index;
+ /** Index into the current Phase of the currently executing handler (if any)*/
+ int current_phase_index;
};
#define AXIS2_INTF_TO_IMPL(msg_ctx) ((axis2_msg_ctx_impl_t *) msg_ctx)
@@ -418,6 +424,34 @@
const axis2_env_t *env,
axis2_options_t *options);
+axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_execution_chain(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ axis2_array_list_t *execution_chain);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_msg_ctx_get_execution_chain(const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_current_handler_index(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ const int index);
+
+int AXIS2_CALL
+axis2_msg_ctx_get_current_handler_index(const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_current_phase_index(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ const int index);
+
+int AXIS2_CALL
+axis2_msg_ctx_get_current_phase_index(const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
+
+
/************************* End of function headers ****************************/
AXIS2_EXTERN axis2_msg_ctx_t * AXIS2_CALL
@@ -473,6 +507,9 @@
msg_ctx_impl->svc_grp_id = NULL;
msg_ctx_impl->svc_qname = NULL;
msg_ctx_impl->op_qname = NULL;
+ msg_ctx_impl->execution_chain = NULL;
+ msg_ctx_impl->current_handler_index = 0;
+ msg_ctx_impl->current_phase_index = 0;
msg_ctx_impl->base = axis2_ctx_create(env);
if (!(msg_ctx_impl->base))
@@ -593,6 +630,18 @@
msg_ctx_impl->msg_ctx.ops->find_svc = axis2_msg_ctx_find_svc;
msg_ctx_impl->msg_ctx.ops->find_op = axis2_msg_ctx_find_op;
msg_ctx_impl->msg_ctx.ops->set_options = axis2_msg_ctx_set_options;
+ msg_ctx_impl->msg_ctx.ops->get_execution_chain =
+ axis2_msg_ctx_get_execution_chain;
+ msg_ctx_impl->msg_ctx.ops->set_execution_chain =
+ axis2_msg_ctx_set_execution_chain;
+ msg_ctx_impl->msg_ctx.ops->get_current_handler_index =
+ axis2_msg_ctx_get_current_handler_index;
+ msg_ctx_impl->msg_ctx.ops->set_current_handler_index =
+ axis2_msg_ctx_set_current_handler_index;
+ msg_ctx_impl->msg_ctx.ops->get_current_phase_index =
+ axis2_msg_ctx_get_current_phase_index;
+ msg_ctx_impl->msg_ctx.ops->set_current_phase_index =
+ axis2_msg_ctx_set_current_phase_index;
return &(msg_ctx_impl->msg_ctx);
}
@@ -1985,4 +2034,73 @@
}
return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_execution_chain(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ axis2_array_list_t *execution_chain)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(msg_ctx)->execution_chain = execution_chain;
+ AXIS2_INTF_TO_IMPL(msg_ctx)->current_handler_index = -1;
+ AXIS2_INTF_TO_IMPL(msg_ctx)->current_phase_index = 0;
+ return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_msg_ctx_get_execution_chain(const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, NULL);
+ return AXIS2_INTF_TO_IMPL(msg_ctx)->execution_chain;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_current_handler_index(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ const int index)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(msg_ctx)->current_handler_index = index;
+ if (AXIS2_INTF_TO_IMPL(msg_ctx)->execution_chain)
+ {
+ axis2_handler_t *handler = (axis2_handler_t *)
+ AXIS2_ARRAY_LIST_GET(AXIS2_INTF_TO_IMPL(msg_ctx)->execution_chain,
+ env, index);
+ if (handler)
+ {
+ AXIS2_INTF_TO_IMPL(msg_ctx)->paused_handler_name =
+ AXIS2_HANDLER_GET_NAME(handler, env);
+ }
+ }
+ return AXIS2_SUCCESS;
+}
+
+int AXIS2_CALL
+axis2_msg_ctx_get_current_handler_index(const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ return AXIS2_INTF_TO_IMPL(msg_ctx)->current_handler_index;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_current_phase_index(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ const int index)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(msg_ctx)->current_phase_index = index;
+ return AXIS2_SUCCESS;
+
+}
+
+int AXIS2_CALL
+axis2_msg_ctx_get_current_phase_index(const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ return AXIS2_INTF_TO_IMPL(msg_ctx)->current_phase_index;
}
Modified: webservices/axis2/trunk/c/modules/core/engine/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/engine/Makefile.am?rev=419742&r1=419741&r2=419742&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/core/engine/Makefile.am Thu Jul 6 16:37:15 2006
@@ -1,5 +1,5 @@
lib_LTLIBRARIES = libaxis2_engine.la
-noinst_HEADERS = axis2_engine.h \
+noinst_HEADERS = \
axis2_event.h
libaxis2_engine_la_SOURCES = handler.c \
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org