Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

it_bus/port.h

00001 #ifndef _IT_BUS_PORT_H_
00002 #define _IT_BUS_PORT_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <it_bus/api_defines.h>
00008 #include <it_bus/types.h>
00009 #include <it_bus/service_exception.h>
00010 #include <it_bus/named_attributes.h>
00011 #include <it_wsdl/wsdl_port.h>
00012 #include <it_bus/threading_model.h>
00013 #include <it_bus/port_factory.h>
00014 
00015 namespace IT_Bus
00016 {
00017     class ClientOperation;
00018     class ClientBinding;
00019     class ServerBinding;
00020     class Servant;
00021     class ServantProvider;
00022     class ServiceBase;
00023 
00024     class IT_BUS_API MessageAttributes : public NamedAttributes
00025     {
00026       public:
00027         MessageAttributes() {}
00028     };
00029 
00030     class IT_BUS_API PortAttributes : public NamedAttributes
00031     {
00032       public:
00033         PortAttributes() {}
00034 
00035         virtual void update();
00036     };
00037 
00038     class IT_BUS_API NonTransactionalException :
00039         public Exception
00040     {
00041       public:
00042         NonTransactionalException(const String& message);
00043         
00044         virtual ~NonTransactionalException();
00045 
00049         virtual Exception*
00050         clone() const;
00051     
00055         virtual void
00056         rethrow() const;
00057     };
00058 
00062     class IT_BUS_API TransactionInterface
00063     {
00064       public:
00065         virtual ~TransactionInterface();
00066 
00077         virtual bool
00078         supports_transactions();
00079 
00088         virtual void 
00089         begin();
00090 
00099         virtual void 
00100         commit();
00101 
00110         virtual void 
00111         rollback();
00112     };
00113 
00125     class IT_BUS_API Port : public TransactionInterface
00126     {
00127       public:
00128         Port() {}
00129 
00130         virtual ClientOperation * 
00131         create_operation(
00132             const String & operation_name
00133         ) throw((ServiceException)) = 0;
00134 
00135         virtual void
00136         activate() = 0;
00137 
00138         virtual void
00139         deactivate() = 0;
00140 
00141         virtual void
00142         shutdown() = 0;
00143 
00144         virtual void
00145         wait() = 0;
00146 
00154         virtual const IT_WSDL::WSDLPort& 
00155         get_wsdl_port() const = 0;
00156 
00157         virtual void
00158         set_threading_model(ThreadingModel threading_model) = 0;
00159 
00173         virtual IT_WSDL::WSDLExtensionElement&
00174         get_configuration() = 0;
00175 
00179         virtual ClientBinding*
00180         get_client_binding() = 0;
00181 
00182         virtual ServerBinding*
00183         get_server_binding() = 0;
00184 
00193         virtual void
00194         register_servant(
00195             Servant & servant
00196         )= 0;
00197 
00203         virtual Servant*
00204         get_servant() = 0;
00205 
00206         virtual void
00207         register_servant_manager(
00208             ServantProvider & servant_manager
00209         )= 0;
00210 
00211         virtual ServantProvider *
00212         get_servant_manager() = 0;
00213 
00214         virtual const PortFactory * 
00215         get_port_factory() const = 0;
00216 
00226         virtual ServiceBase * 
00227         get_service() = 0;
00228 
00239         virtual void
00240         register_default_servant(
00241             Servant & servant
00242         ) = 0;
00243 
00257         virtual void
00258         get_reference_with_id(
00259             const String &      instance_id,
00260             IT_WSDL::WSDLPort & wsdl_port
00261         ) = 0;
00262 
00263       private:
00264         
00265         Port & 
00266         operator =(
00267             const Port& rhs
00268         );
00269         
00270         Port(
00271             const Port& rhs
00272         );
00273     };
00274 }
00275 
00276 #endif  

Generated on Wed Mar 22 12:23:03 2006 for Artix by  doxygen 1.3.9.1