Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Service_Callbacks.h
blob99bf850fa48bbf9451fc8a05f7f2a98ae8b5db4e
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:
61 enum Profile_Equivalence
63 EQUIVALENT,
64 NOT_EQUIVALENT,
65 DONT_KNOW
68 /// Dtor
69 virtual ~TAO_Service_Callbacks ();
71 /// Select the profile from MProfile as the needs of the services
72 /// may be. Return the profile in @a pfile
73 virtual CORBA::Boolean select_profile (const TAO_MProfile &mprofile,
74 TAO_Profile *&pfile);
76 /// Check whether @a obj is nil or not.
77 virtual CORBA::Boolean object_is_nil (CORBA::Object_ptr obj);
79 /// Check for equivalency of the two profiles
80 virtual Profile_Equivalence is_profile_equivalent (const TAO_Profile *,
81 const TAO_Profile *);
83 /// Calculate the hash value..
84 virtual CORBA::ULong hash_ft (TAO_Profile *p,
85 CORBA::ULong m);
87 /// Verify if condition is given for LOCATION_FORWARD_PERM reply
88 virtual CORBA::Boolean is_permanent_forward_condition (const CORBA::Object_ptr obj,
89 const TAO_Service_Context &service_context) const;
91 /// Allow the service layer to decide whether the COMM_FAILURE
92 /// exception should be thrown or a reinvocation is needed
93 virtual TAO::Invocation_Status raise_comm_failure (
94 IOP::ServiceContextList &clist,
95 TAO_Profile *profile);
97 /// Allow the service layer to decide whether the TRANSIENT
98 /// exception should be thrown or a reinvocation is needed
99 virtual TAO::Invocation_Status raise_transient_failure (
100 IOP::ServiceContextList &clist,
101 TAO_Profile *profile);
104 TAO_END_VERSIONED_NAMESPACE_DECL
106 #include /**/ "ace/post.h"
108 #endif /*TAO_SERVICE_CALLBACK_H*/