it_bus/service_lifecycle_exception.h

00001 #ifndef _IT_BUS_ACTIVATION_EXCEPTION_H_
00002 #define _IT_BUS_ACTIVATION_EXCEPTION_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <it_bus/api_defines.h>
00008 #include <it_bus/exception.h>
00009 #include <it_bus/service.h>
00010 #include <it_bus/qname.h>
00011 #include <it_bus/var.h>
00012 #include <it_bus/ref_counted_base.h>
00013 #include <omg/orb.hh>
00014 
00015 
00016 
00017 namespace IT_Bus
00018 {
00023     class IT_BUS_API ServiceLifecycleException :
00024         public Exception
00025     {
00026       public:
00033         ServiceLifecycleException(
00034             const IT_WSDL::WSDLPort& wsdl_port,
00035             const Exception& original
00036         );
00037 
00041         ServiceLifecycleException(
00042             const ServiceLifecycleException&
00043         );
00044 
00048         virtual Exception*
00049         clone() const;
00050     
00054         virtual void
00055         rethrow() const;
00056 
00062         const QName&
00063         get_service_qname() const;
00064 
00070         const String&
00071         get_port_name() const;
00072 
00073       private:
00074         ServiceLifecycleException(
00075             const String& message
00076         );
00077 
00078         ServiceLifecycleException&
00079         operator=(
00080             const IT_Bus::Exception& rhs
00081         );
00082 
00083         QName m_service_name;
00084         String m_port_name;
00085     };
00086 
00087 
00092     class IT_BUS_API ServiceActivationException :
00093         public ServiceLifecycleException
00094     {
00095       public:
00102         ServiceActivationException(
00103             const IT_WSDL::WSDLPort& wsdl_port,
00104             const Exception& original
00105         );
00106 
00110         ServiceActivationException(
00111             const ServiceLifecycleException&
00112         );
00113 
00117         virtual Exception*
00118         clone() const;
00119     
00123         virtual void
00124         rethrow() const;
00125     };
00126 
00127     class IT_BUS_API ExceptionWrapper : public RefCountedBase
00128     {
00129     public:
00130 
00131         ExceptionWrapper(
00132             IT_Bus::Exception*
00133         );
00134 
00135         ~ExceptionWrapper();
00136 
00137         const IT_Bus::Exception*
00138         get() const;
00139 
00140     private:
00141         IT_Bus::Exception* m_ex;
00142     };
00143 
00148     class IT_BUS_API ShutdownRequestException :
00149         public Exception,
00150         public CORBA::SystemException
00151     {
00152       public:
00156         ShutdownRequestException();
00157 
00161         ShutdownRequestException(
00162             const ShutdownRequestException&
00163         );
00164 
00168         virtual
00169         ~ShutdownRequestException();
00170 
00174         virtual IT_Bus::Exception*
00175         clone() const;
00176     
00180         virtual void
00181         rethrow() const;
00182 
00188         void
00189         set_cause(
00190             IT_Bus::Exception* e
00191         );
00192 
00198         const IT_Bus::Exception*
00199         get_cause() const;
00200 
00201         IT_String
00202         _it_to_string() const;
00203 
00204         void 
00205         _raise() const;
00206 
00207         CORBA::Exception*
00208         _it_copy() const;
00209 
00210         CORBA::TypeCode*
00211         _it_get_typecode_nc() const;
00212 
00213         CORBA::TypeCode* 
00214         _it_get_typecode() const;
00215 
00216     private:
00217 
00218         ShutdownRequestException(
00219             const String& message
00220         );
00221 
00222         ShutdownRequestException&
00223         operator=(
00224             const IT_Bus::Exception& rhs
00225         );
00226 
00227         Var<ExceptionWrapper> m_cause;
00228     };
00229 
00230 }
00231 
00232 #endif  

Generated on Tue Mar 20 15:27:43 2007 for Artix by  doxygen 1.5.1-p1