it_bus_pdk/context.h

00001 #ifndef _IT_BUS_PDK_CONTEXT_H_
00002 #define _IT_BUS_PDK_CONTEXT_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #ifndef IT_MINIMISE_INCLUDES
00008 #include <it_bus/any_type.h>
00009 #include <it_bus_pdk/context_base.h>
00010 #include <it_bus_pdk/context_attrs/binding_context.h>
00011 #endif
00012 #include <it_bus/types.h>
00013 #include <it_bus/qname.h>
00014 
00015 namespace IT_Bus
00016 {
00017     class ContextCurrent;
00018 
00019     class Context;
00020 
00021     class ContextContainer;
00022     
00023     class AnyType;
00024     class BindingContext;
00025 
00026         
00034     class IT_BUS_API ContextRegistry
00035     {
00036       public:
00037 
00038         virtual ~ContextRegistry();
00039         
00040 
00046         enum ContextType
00047         {
00048             TYPE,
00049             ELEMENT
00050         };
00051 
00057         virtual ContextCurrent&
00058         get_current() = 0;
00059 
00075         virtual Boolean
00076         register_context(
00077             const QName& context_name,
00078             const QName& context_type,
00079             ContextType type = TYPE,
00080             Boolean is_header = false
00081         ) = 0;
00082 
00083         //
00084         // the following API is used to register
00085         // a SOAP header context. It will be
00086         // deprecated once the SOAP binding has the
00087         // ability to obtain additional context-specific
00088         // details from the WSDL
00089         //
00105         virtual Boolean
00106         register_context(
00107             const QName& context_name,
00108             const QName& context_type,
00109             const QName& message_name,
00110             const String& part_name
00111         ) = 0;
00112 
00113         //
00114         // the following API is used to register
00115         // a SOAP header context. It will be
00116         // deprecated once the SOAP binding has the
00117         // ability to obtain additional context-specific
00118         // details from the WSDL
00119         //
00135         virtual Boolean
00136         register_context_as_element(
00137             const QName& context_name,
00138             const QName& element_name,
00139             const QName& message_name,
00140             const String& part_name
00141         ) = 0;
00142 
00143 
00144         //
00145         // the following API is used to register a header
00146         // context to be passed as IOP::ServiceContext. It
00147         // will be deprecated once the CORBA binding has the
00148         // ability to obtain additional context-specific
00149         // details from the WSDL
00150         //
00162         virtual Boolean
00163         register_context(
00164             const QName& context_name,
00165             const QName& context_type,
00166             const unsigned long context_id
00167         ) = 0;
00168 
00169         // for Context objects
00178         virtual Boolean
00179         register_context_data(
00180             const QName& context_name
00181         ) = 0;
00182 
00188         virtual Boolean
00189         is_registered(
00190             const QName& context_name
00191         ) = 0;
00192 
00199         virtual ContextContainer *
00200         get_configuration_context(
00201             const QName &  service_name,
00202             const String & port_name,
00203             bool           create_if_not_found = false
00204         ) = 0;
00205 
00206    };
00207 
00211     class IT_BUS_API ContextContainer
00212     {
00213       public:
00214 
00215         virtual ~ContextContainer();
00216 
00247         virtual AnyType*
00248         get_context(
00249             const QName& context_name,
00250             bool         create_if_not_found = false
00251         ) = 0;
00252 
00261         virtual const AnyType*
00262         get_context(
00263             const QName& context_name
00264         ) const = 0;
00265 
00274         virtual Boolean
00275         add_context(
00276             const QName& context_name,
00277             AnyType&     context
00278         ) = 0;
00279 
00286         virtual Context*
00287         get_context_data(
00288             const QName& context_name
00289         ) = 0;
00290 
00297         virtual const Context*
00298         get_context_data(
00299             const QName& context_name
00300         ) const = 0;
00301        
00311         virtual BindingContext*
00312         get_binding_context(
00313             const QName&   context_name,
00314             const QName&   binding_context,
00315             bool create_if_not_found = false
00316         ) = 0;
00317 
00325         virtual const BindingContext*
00326         get_binding_context(
00327             const QName&   context_name,
00328             const QName&   binding_context
00329         ) const = 0;
00330             
00341         virtual Boolean
00342         add_context(
00343             const QName& context_name,
00344             Context&     context
00345         ) = 0;
00346 
00353         virtual Boolean
00354         remove_context(
00355             const QName& context_name
00356         ) = 0;
00357 
00365         virtual bool
00366         contains(
00367             const QName& context_name
00368         ) = 0;
00369     };
00370 
00374     class IT_BUS_API ContextCurrent
00375     {
00376       public:
00377 
00378         virtual ~ContextCurrent();
00379         
00386         virtual ContextContainer*
00387         request_contexts() = 0;
00388 
00395         virtual ContextContainer*
00396         reply_contexts() = 0;
00397     };
00398 }
00399 
00400 #endif  

Generated on Thu Sep 7 11:39:11 2006 for Artix by  doxygen 1.4.7