00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifdef WIN32
00020 #pragma warning (disable : 4503)
00021 #endif
00022
00023 #if !defined(AXIS_HANDLERPOOL_H__INCLUDED_)
00024 #define AXIS_HANDLERPOOL_H__INCLUDED_
00025
00026 #include <axis/server/WSDDHandler.h>
00027 #include <axis/server/WSDDService.h>
00028 #include <axis/server/BasicHandler.h>
00029 #include "HandlerLoader.h"
00030 #include <axis/server/HandlerChain.h>
00031 #include "SharedObject.h"
00032
00033 #include <list>
00034 #include <string>
00035
00036 using namespace std;
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 class HandlerPool:protected SharedObject
00047 {
00048 private:
00049 int GetHandler (BasicHandler** ppHandler, string &sSessionId,
00050 int nScope, int nLibId);
00051 int PoolHandler (string &sSessionId, BasicHandler* pHandler, int nScope,
00052 int nLibId);
00053 int GetHandlerChain (string &sSessionId, HandlerChain** pChain,
00054 const WSDDHandlerList* pHandlerList);
00055 public:
00056 int GetGlobalRequestFlowHandlerChain (HandlerChain** ppChain,
00057 string &sSessionId);
00058 int GetGlobalResponseFlowHandlerChain (HandlerChain** ppChain,
00059 string &sSessionId);
00060 int GetTransportRequestFlowHandlerChain (HandlerChain** ppChain,
00061 string &sSessionId, AXIS_PROTOCOL_TYPE Protocol);
00062 int GetTransportResponseFlowHandlerChain (HandlerChain** ppChain,
00063 string &sSessionId, AXIS_PROTOCOL_TYPE Protocol);
00064 int GetRequestFlowHandlerChain (HandlerChain** ppChain,
00065 string &sSessionId, const WSDDService* pService);
00066 int GetResponseFlowHandlerChain (HandlerChain** ppChain,
00067 string &sSessionId, const WSDDService* pService);
00068 void PoolHandlerChain (HandlerChain* pChain, string &sSessionId);
00069 int GetWebService (BasicHandler** ppHandler, string &sSessionId,
00070 const WSDDHandler* pService);
00071 void PoolWebService (string &sSessionId, BasicHandler* pHandler,
00072 const WSDDHandler* pHandlerInfo);
00073
00074 HandlerPool ();
00075 virtual ~ HandlerPool ();
00076 private:
00077 list <HandlerChain*>m_ChainStore;
00078 };
00079
00080 #endif