Updated logging to include the class/method so that it is more obvious where these...
[ACE_TAO.git] / TAO / tao / Service_Callbacks.h
blob5eddb99847f947bd69eaa707e4bc27e7dc448a63
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Service_Callbacks.h
7 * This is a generic interface that would be used to override many
8 * of the default functionalities that the ORB provides by the
9 * services if they have been loaded in to the ORB_Core
11 * @author Bala Natarajan <bala@cs.wustl.edu>
13 //=============================================================================
15 #ifndef TAO_SERVICE_CALLBACK_H
16 #define TAO_SERVICE_CALLBACK_H
18 #include /**/ "ace/pre.h"
20 #include "tao/Basic_Types.h"
22 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 # pragma once
24 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 #include /**/ "tao/TAO_Export.h"
27 #include "tao/Invocation_Utils.h"
28 #include "tao/Object.h"
29 #include "tao/Service_Context.h"
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 class TAO_Profile;
34 class TAO_MProfile;
35 class TAO_Stub;
37 namespace CORBA
39 class Object;
40 typedef Object *Object_ptr;
43 namespace IOP
45 class ServiceContextList;
48 /**
49 * @class TAO_Service_Callbacks
51 * @brief An Abstract Base class for the hooks in the ORB.
53 * This class (would) define all the hooks that may be needed by
54 * the ORB to override some of its default behavior. The methods
55 * can be potentially used to call service level specific
56 * processing that may be required.
58 class TAO_Export TAO_Service_Callbacks
60 public:
62 enum Profile_Equivalence
64 EQUIVALENT,
65 NOT_EQUIVALENT,
66 DONT_KNOW
69 /// Dtor
70 virtual ~TAO_Service_Callbacks ();
72 /// Select the profile from MProfile as the needs of the services
73 /// may be. Return the profile in @a pfile
74 virtual CORBA::Boolean select_profile (const TAO_MProfile &mprofile,
75 TAO_Profile *&pfile);
77 /// Check whether @a obj is nil or not.
78 virtual CORBA::Boolean object_is_nil (CORBA::Object_ptr obj);
80 /// Check for equivalency of the two profiles
81 virtual Profile_Equivalence is_profile_equivalent (const TAO_Profile *,
82 const TAO_Profile *);
84 /// Calculate the hash value..
85 virtual CORBA::ULong hash_ft (TAO_Profile *p,
86 CORBA::ULong m);
88 /// Verify if condition is given for LOCATION_FORWARD_PERM reply
89 virtual CORBA::Boolean is_permanent_forward_condition (const CORBA::Object_ptr obj,
90 const TAO_Service_Context &service_context) const;
92 /// Allow the service layer to decide whether the COMM_FAILURE
93 /// exception should be thrown or a reinvocation is needed
94 virtual TAO::Invocation_Status raise_comm_failure (
95 IOP::ServiceContextList &clist,
96 TAO_Profile *profile);
98 /// Allow the service layer to decide whether the TRANSIENT
99 /// exception should be thrown or a reinvocation is needed
100 virtual TAO::Invocation_Status raise_transient_failure (
101 IOP::ServiceContextList &clist,
102 TAO_Profile *profile);
105 TAO_END_VERSIONED_NAMESPACE_DECL
107 #include /**/ "ace/post.h"
109 #endif /*TAO_SERVICE_CALLBACK_H*/