Service_Callbacks.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Service_Callbacks.h
00006  *
00007  *  Service_Callbacks.h,v 1.20 2006/06/20 06:04:14 jwillemsen Exp
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 #include "ace/CORBA_macros.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "tao/TAO_Export.h"
00028 #include "tao/Basic_Types.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   class Environment;
00045 }
00046 
00047 namespace IOP
00048 {
00049   class ServiceContextList;
00050 }
00051 
00052 /**
00053  * @class TAO_Service_Callbacks
00054  *
00055  * @brief An Abstract Base class for the hooks in the ORB.
00056  *
00057  * This class (would) define all the hooks that may be needed by
00058  * the ORB to override some of its default behaviour. The methods
00059  * can be potentially used to call service level specific
00060  * processing that may be required.
00061  */
00062 class TAO_Export TAO_Service_Callbacks
00063 {
00064 
00065 public:
00066 
00067   enum Profile_Equivalence
00068   {
00069     EQUIVALENT,
00070     NOT_EQUIVALENT,
00071     DONT_KNOW
00072   };
00073 
00074 
00075   /// Dtor
00076   virtual ~TAO_Service_Callbacks (void);
00077 
00078   /// Select the profile from MProfile as the needs of the services
00079   /// may be. Return the profile in <pfile>
00080   virtual CORBA::Boolean select_profile (TAO_MProfile *mprofile,
00081                                          TAO_Profile *&pfile);
00082 
00083   /// Select the profile from MProfile as the needs of the services
00084   /// may be. Return the profile in <pfile>
00085   virtual CORBA::Boolean reselect_profile (TAO_Stub *stub,
00086                                            TAO_Profile *&pfile);
00087 
00088   /// Reset the profile flags that the services could have
00089   virtual void reset_profile_flags (void);
00090 
00091   /// Check whether <obj> is nil or not.
00092   virtual CORBA::Boolean object_is_nil (CORBA::Object_ptr obj);
00093 
00094 
00095   /// Check for equivalency of the two profiles
00096   virtual Profile_Equivalence is_profile_equivalent (const TAO_Profile *,
00097                                                      const TAO_Profile *);
00098 
00099   /// Calculate the hash value..
00100   virtual CORBA::ULong hash_ft (TAO_Profile *p,
00101                                 CORBA::ULong m);
00102 
00103   // Verify if condition is given for LOCATION_FORWARD_PERM reply
00104   virtual CORBA::Boolean is_permanent_forward_condition (const CORBA::Object_ptr obj,
00105                                                          const TAO_Service_Context &service_context) const;
00106 
00107 
00108 
00109   /// Allow the service layer to decide whether the COMM_FAILURE
00110   /// exception should be thrown or a reinvocation is needed
00111   virtual TAO::Invocation_Status raise_comm_failure (
00112       IOP::ServiceContextList &clist,
00113       TAO_Profile *profile
00114       ACE_ENV_ARG_DECL);
00115 
00116   /// Allow the service layer to decide whether the TRANSIENT
00117   /// exception should be thrown or a reinvocation is needed
00118   virtual TAO::Invocation_Status raise_transient_failure (
00119       IOP::ServiceContextList &clist,
00120       TAO_Profile *profile
00121       ACE_ENV_ARG_DECL);
00122 };
00123 
00124 TAO_END_VERSIONED_NAMESPACE_DECL
00125 
00126 #include /**/ "ace/post.h"
00127 
00128 #endif /*TAO_SERVICE_CALLBACK_H*/

Generated on Thu Nov 9 11:54:21 2006 for TAO by doxygen 1.3.6