00001 #ifndef _IT_BUS_BINDING_MANAGER_H_
00002 #define _IT_BUS_BINDING_MANAGER_H_
00003
00004
00005
00006 #ifndef IT_MINIMISE_INCLUDES
00007 #include <it_wsdl/wsdl_port.h>
00008 #include <it_bus/bus.h>
00009 #endif
00010 #include <it_wsdl/wsdl_binding.h>
00011 #include <it_bus/bus_type_alias.h>
00012 #include <it_bus/operation.h>
00013 #include <it_bus_pdk/interceptor.h>
00014
00015 namespace IT_Bus
00016 {
00017 class BindingManager;
00018 class ServerRequestInterceptorNode;
00019
00020 class IT_BUS_API ClientBinding
00021 {
00022 public:
00023
00024 ClientRequestInterceptor*
00025 first_request_interceptor();
00026
00027 ClientRequestInterceptorChain&
00028 interceptor_chain();
00029
00030 void
00031 add_interceptor(
00032 ClientRequestInterceptor* interceptor
00033 );
00034
00035 void
00036 teardown(
00037 ClientRequestInterceptor* port_interceptor
00038 );
00039
00040 ClientBinding();
00041
00042 ~ClientBinding();
00043
00044 private:
00045 ClientRequestInterceptorChain m_chain;
00046 };
00047
00048 class IT_BUS_API ServerBinding
00049 {
00050 public:
00051
00052 ServerRequestInterceptor*
00053 first_request_interceptor();
00054
00055 ServerRequestInterceptor*
00056 last_request_interceptor();
00057
00058 ServerRequestInterceptorChain&
00059 interceptor_chain();
00060
00061 void
00062 add_interceptor(
00063 ServerRequestInterceptorNode* interceptor_node
00064 );
00065
00066 void
00067 teardown(
00068 ServerRequestInterceptor* port_interceptor
00069 );
00070
00071 ServerRequestInterceptor*
00072 request_interceptor(
00073 const String& interceptor_factory_name
00074 );
00075
00076 ServerBinding();
00077
00078 ~ServerBinding();
00079
00080 private:
00081 ServerRequestInterceptorChain m_chain;
00082 };
00083
00084 class IT_BUS_API BindingManager
00085 {
00086 public:
00087
00088
00089
00090
00091 static ClientBinding*
00092 create_client_binding(
00093 Bus_ptr bus,
00094 const IT_WSDL::WSDLPort& wsdl_port,
00095 InterceptorFactoryList& factory_list,
00096 ClientRequestInterceptor* port_interceptor
00097 );
00098
00099
00100
00101
00102 static ServerBinding*
00103 create_server_binding(
00104 Bus_ptr bus,
00105 const IT_WSDL::WSDLPort& wsdl_port,
00106 InterceptorFactoryList& factory_list,
00107 ServerRequestInterceptorNode* port_interceptor_node
00108 );
00109
00110 static void
00111 start_client_invocation(
00112 ClientBinding* binding,
00113 ClientOperation& operation
00114 );
00115
00116 static void
00117 start_server_predispatch(
00118 ServerBinding* binding,
00119 ServerOperation& operation
00120 );
00121
00122 static void
00123 start_server_postdispatch(
00124 ServerBinding* binding,
00125 ServerOperation& operation
00126 );
00127
00128 static void
00129 start_server_around_dispatch(
00130 ServerBinding* binding,
00131 ServerOperation& operation
00132 );
00133 };
00134 }
00135
00136 #endif