it_bus/service_factory.h

00001 #ifndef _IT_BUS_SERVICE_FACTORY_H_
00002 #define _IT_BUS_SERVICE_FACTORY_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #ifndef IT_MINIMISE_INCLUDES
00008 #include <it_bus/bus.h>
00009 #include <it_bus_pdk/service_listener.h>
00010 #endif
00011 
00012 #include <it_bus/service.h>
00013 #include <it_bus/api_defines.h>
00014 #include <it_bus/service_exception.h>
00015 #include <it_bus/types.h>
00016 #include <it_bus/qname.h>
00017 #include <it_bus/bus_type_alias.h>
00018 #include <it_dsa/vector.h>
00019 
00020 namespace IT_Bus
00021 {
00022     class ClientService;
00023     class ServiceListener;
00024     class IT_BUS_API ServiceFactory
00025     {
00026       public:
00027         typedef IT_Vector<ServiceListener*> ServiceListenerList;
00028       
00029         virtual Service*
00030         create_service(
00031             const String& wsdl_url,
00032             const QName&  service_name
00033         ) IT_THROW_DECL((ServiceException)) = 0;
00034 
00035         virtual Service*
00036         create_service(
00037             const IT_WSDL::WSDLService& wsdl_service,
00038             const QName& base_service_name = QName::EMPTY_QNAME
00039         ) IT_THROW_DECL((ServiceException)) = 0;
00040 
00041         virtual ClientService*
00042         create_client_service(
00043             const String& wsdl_url,
00044             const QName&  service_name
00045         ) IT_THROW_DECL((ServiceException)) = 0;
00046 
00047         virtual ClientService*
00048         create_client_service(
00049             const IT_WSDL::WSDLService& wsdl_service
00050         ) IT_THROW_DECL((ServiceException)) = 0;
00051 
00052         virtual void
00053         destroy_service(
00054             ServerService* service
00055         ) = 0;
00056 
00057         virtual void
00058         destroy_client_service(
00059             ClientService* service
00060         ) = 0;
00061 
00062         static ServiceFactory&
00063         get_instance(Bus_ptr bus = 0);
00064 
00065         virtual void
00066         register_listener(
00067             ServiceListener* listener
00068         ) = 0;
00069 
00070         virtual void
00071         unregister_listener(
00072             ServiceListener* listener
00073         ) = 0;
00074 
00075         virtual const ServiceListenerList&
00076         get_service_listeners() const = 0;
00077       
00078       protected:
00079         ServiceFactory() {}
00080         virtual ~ServiceFactory();
00081 
00082       private:
00083         // private and unimplemented to prevent copying
00084         ServiceFactory(const ServiceFactory&);
00085         void operator=(const ServiceFactory&);
00086     };
00087 }
00088 
00089 #endif  

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