3 //=============================================================================
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)
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
40 typedef Object
*Object_ptr
;
45 class ServiceContextList
;
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
62 enum Profile_Equivalence
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
,
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
*,
84 /// Calculate the hash value..
85 virtual CORBA::ULong
hash_ft (TAO_Profile
*p
,
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*/