Service_Callbacks.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Service_Callbacks.h
00006  *
00007  *  $Id: Service_Callbacks.h 80861 2008-03-07 13:48:34Z johnnyw $
00008  *
00009  * This is a generic interface that would be used to override many
00010  * of the default functionalities that the ORB provides by the
00011  * services if they have been loaded in to the ORB_Core
00012  *
00013  *  @author Bala Natarajan <bala@cs.wustl.edu>
00014  */
00015 //=============================================================================
00016 
00017 #ifndef TAO_SERVICE_CALLBACK_H
00018 #define TAO_SERVICE_CALLBACK_H
00019 
00020 #include /**/ "ace/pre.h"
00021 
00022 #include "tao/Basic_Types.h"
00023 
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 #include /**/ "tao/TAO_Export.h"
00029 #include "tao/Invocation_Utils.h"
00030 #include "tao/Object.h"
00031 #include "tao/Service_Context.h"
00032 
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034 
00035 class TAO_Profile;
00036 class TAO_MProfile;
00037 class TAO_Stub;
00038 
00039 namespace CORBA
00040 {
00041   class Object;
00042   typedef Object *Object_ptr;
00043 }
00044 
00045 namespace IOP
00046 {
00047   class ServiceContextList;
00048 }
00049 
00050 /**
00051  * @class TAO_Service_Callbacks
00052  *
00053  * @brief An Abstract Base class for the hooks in the ORB.
00054  *
00055  * This class (would) define all the hooks that may be needed by
00056  * the ORB to override some of its default behaviour. The methods
00057  * can be potentially used to call service level specific
00058  * processing that may be required.
00059  */
00060 class TAO_Export TAO_Service_Callbacks
00061 {
00062 
00063 public:
00064 
00065   enum Profile_Equivalence
00066   {
00067     EQUIVALENT,
00068     NOT_EQUIVALENT,
00069     DONT_KNOW
00070   };
00071 
00072 
00073   /// Dtor
00074   virtual ~TAO_Service_Callbacks (void);
00075 
00076   /// Select the profile from MProfile as the needs of the services
00077   /// may be. Return the profile in @a pfile
00078   virtual CORBA::Boolean select_profile (const TAO_MProfile &mprofile,
00079                                          TAO_Profile *&pfile);
00080 
00081   /// Check whether @a obj is nil or not.
00082   virtual CORBA::Boolean object_is_nil (CORBA::Object_ptr obj);
00083 
00084 
00085   /// Check for equivalency of the two profiles
00086   virtual Profile_Equivalence is_profile_equivalent (const TAO_Profile *,
00087                                                      const TAO_Profile *);
00088 
00089   /// Calculate the hash value..
00090   virtual CORBA::ULong hash_ft (TAO_Profile *p,
00091                                 CORBA::ULong m);
00092 
00093   /// Verify if condition is given for LOCATION_FORWARD_PERM reply
00094   virtual CORBA::Boolean is_permanent_forward_condition (const CORBA::Object_ptr obj,
00095                                                          const TAO_Service_Context &service_context) const;
00096 
00097   /// Allow the service layer to decide whether the COMM_FAILURE
00098   /// exception should be thrown or a reinvocation is needed
00099   virtual TAO::Invocation_Status raise_comm_failure (
00100       IOP::ServiceContextList &clist,
00101       TAO_Profile *profile);
00102 
00103   /// Allow the service layer to decide whether the TRANSIENT
00104   /// exception should be thrown or a reinvocation is needed
00105   virtual TAO::Invocation_Status raise_transient_failure (
00106       IOP::ServiceContextList &clist,
00107       TAO_Profile *profile);
00108 };
00109 
00110 TAO_END_VERSIONED_NAMESPACE_DECL
00111 
00112 #include /**/ "ace/post.h"
00113 
00114 #endif /*TAO_SERVICE_CALLBACK_H*/

Generated on Tue Feb 2 17:37:52 2010 for TAO by  doxygen 1.4.7