summaryrefslogtreecommitdiff
path: root/TAO/tao/POA.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/POA.h')
-rw-r--r--TAO/tao/POA.h166
1 files changed, 54 insertions, 112 deletions
diff --git a/TAO/tao/POA.h b/TAO/tao/POA.h
index fdd7869cf80..b28086afe40 100644
--- a/TAO/tao/POA.h
+++ b/TAO/tao/POA.h
@@ -57,18 +57,11 @@
// Object Adapter
#include "tao/Object_Adapter.h"
-// This is to remove "inherits via dominance" warnings from MSVC.
-// MSVC is being a little too paranoid.
-#if defined (_MSC_VER)
-# pragma warning (disable : 4250)
-#endif /* _MSC_VER */
-
class TAO_POA;
#if !defined (TAO_HAS_MINIMUM_CORBA)
-class TAO_Export TAO_Thread_Policy : public virtual PortableServer::RefCountServantBase,
- public virtual POA_PortableServer::ThreadPolicy
+class TAO_Export TAO_Thread_Policy : public POA_PortableServer::ThreadPolicy
{
public:
TAO_Thread_Policy (PortableServer::ThreadPolicyValue value,
@@ -94,8 +87,7 @@ protected:
#endif /* TAO_HAS_MINIMUM_CORBA */
-class TAO_Export TAO_Lifespan_Policy : public virtual PortableServer::RefCountServantBase,
- public virtual POA_PortableServer::LifespanPolicy
+class TAO_Export TAO_Lifespan_Policy : public POA_PortableServer::LifespanPolicy
{
public:
TAO_Lifespan_Policy (PortableServer::LifespanPolicyValue value,
@@ -119,8 +111,7 @@ protected:
PortableServer::POA_var poa_;
};
-class TAO_Export TAO_Id_Uniqueness_Policy : public virtual PortableServer::RefCountServantBase,
- public virtual POA_PortableServer::IdUniquenessPolicy
+class TAO_Export TAO_Id_Uniqueness_Policy : public POA_PortableServer::IdUniquenessPolicy
{
public:
TAO_Id_Uniqueness_Policy (PortableServer::IdUniquenessPolicyValue value,
@@ -144,8 +135,7 @@ protected:
PortableServer::POA_var poa_;
};
-class TAO_Export TAO_Id_Assignment_Policy : public virtual PortableServer::RefCountServantBase,
- public virtual POA_PortableServer::IdAssignmentPolicy
+class TAO_Export TAO_Id_Assignment_Policy : public POA_PortableServer::IdAssignmentPolicy
{
public:
TAO_Id_Assignment_Policy (PortableServer::IdAssignmentPolicyValue value,
@@ -171,8 +161,7 @@ protected:
#if !defined (TAO_HAS_MINIMUM_CORBA)
-class TAO_Export TAO_Implicit_Activation_Policy : public virtual PortableServer::RefCountServantBase,
- public virtual POA_PortableServer::ImplicitActivationPolicy
+class TAO_Export TAO_Implicit_Activation_Policy : public POA_PortableServer::ImplicitActivationPolicy
{
public:
TAO_Implicit_Activation_Policy (PortableServer::ImplicitActivationPolicyValue value,
@@ -196,8 +185,7 @@ protected:
PortableServer::POA_var poa_;
};
-class TAO_Export TAO_Servant_Retention_Policy : public virtual PortableServer::RefCountServantBase,
- public virtual POA_PortableServer::ServantRetentionPolicy
+class TAO_Export TAO_Servant_Retention_Policy : public POA_PortableServer::ServantRetentionPolicy
{
public:
TAO_Servant_Retention_Policy (PortableServer::ServantRetentionPolicyValue value,
@@ -221,8 +209,7 @@ protected:
PortableServer::POA_var poa_;
};
-class TAO_Export TAO_Request_Processing_Policy : public virtual PortableServer::RefCountServantBase,
- public virtual POA_PortableServer::RequestProcessingPolicy
+class TAO_Export TAO_Request_Processing_Policy : public POA_PortableServer::RequestProcessingPolicy
{
public:
TAO_Request_Processing_Policy (PortableServer::RequestProcessingPolicyValue value,
@@ -359,17 +346,14 @@ protected:
void *time_stamp_;
};
-class TAO_POA_Current_Impl;
+class TAO_POA_Current;
class TAO_Export TAO_POA : public POA_PortableServer::POA
{
public:
friend class TAO_Object_Adapter;
- friend class TAO_Object_Adapter::Outstanding_Requests;
- friend class TAO_Object_Adapter::Single_Threaded_POA_Lock;
- friend class TAO_POA_Current_Impl;
- friend class TAO_POA_Manager;
+ friend class TAO_POA_Current;
typedef ACE_CString String;
@@ -488,9 +472,9 @@ public:
static void decode_string_to_sequence (TAO_Unbounded_Sequence<CORBA::Octet> &seq,
const char *str);
- static char* ObjectId_to_string (const PortableServer::ObjectId &id);
+ static CORBA::String ObjectId_to_string (const PortableServer::ObjectId &id);
- static CORBA::WChar* ObjectId_to_wstring (const PortableServer::ObjectId &id);
+ static CORBA::WString ObjectId_to_wstring (const PortableServer::ObjectId &id);
static PortableServer::ObjectId *string_to_ObjectId (const char *id);
@@ -504,7 +488,6 @@ public:
const TAO_POA_Policies &policies,
TAO_POA *parent,
ACE_Lock &lock,
- ACE_SYNCH_MUTEX &thread_lock,
TAO_ORB_Core &orb_core,
CORBA_Environment &ACE_TRY_ENV);
@@ -568,15 +551,9 @@ protected:
PortableServer::Servant p_servant,
CORBA_Environment &ACE_TRY_ENV);
- void deactivate_all_objects_i (CORBA::Boolean etherealize_objects,
- CORBA::Environment &ACE_TRY_ENV);
-
void deactivate_object_i (const PortableServer::ObjectId &oid,
CORBA_Environment &ACE_TRY_ENV);
- void cleanup_servant (TAO_Active_Object_Map::Map_Entry *active_object_map_entry,
- CORBA::Environment &ACE_TRY_ENV);
-
CORBA::Object_ptr create_reference_i (const char *intf,
CORBA_Environment &ACE_TRY_ENV);
@@ -645,7 +622,7 @@ protected:
PortableServer::Servant locate_servant_i (const char *operation,
const PortableServer::ObjectId &id,
- TAO_POA_Current_Impl *poa_current_impl,
+ TAO_POA_Current *poa_current,
CORBA_Environment &ACE_TRY_ENV);
const TAO_Creation_Time &creation_time (void);
@@ -680,18 +657,6 @@ protected:
static CORBA::ULong root_key_type_length (void);
- CORBA::ULong outstanding_requests (void) const;
-
- void outstanding_requests (CORBA::ULong new_outstanding_requests);
-
- CORBA::ULong increment_outstanding_requests (void);
-
- CORBA::ULong decrement_outstanding_requests (void);
-
- void establish_servant_lock (PortableServer::Servant servant);
-
- void teardown_servant_lock (PortableServer::Servant servant);
-
String name_;
TAO_Object_Adapter::poa_name folded_name_;
@@ -727,6 +692,8 @@ protected:
ACE_Lock &lock_;
+ int closing_down_;
+
int persistent_;
int system_id_;
@@ -734,16 +701,6 @@ protected:
TAO_Creation_Time creation_time_;
TAO_ORB_Core &orb_core_;
-
- CORBA::Boolean cleanup_in_progress_;
-
- CORBA::Boolean etherealize_objects_;
-
- CORBA::ULong outstanding_requests_;
-
- ACE_SYNCH_CONDITION outstanding_requests_condition_;
-
- CORBA::Boolean destroy_pending_;
};
#if !defined (TAO_HAS_MINIMUM_CORBA)
@@ -761,51 +718,31 @@ public:
class TAO_Export TAO_POA_Current : public POA_PortableServer::Current
{
-public:
-
- PortableServer::POA_ptr get_POA (CORBA_Environment &ACE_TRY_ENV);
- // Returns the POA on which the current request is being invoked.
- // Can raise the <CORBA::NoContext> exception if this function is
- // not invoked in the context of an upcall.
-
- PortableServer::ObjectId *get_object_id (CORBA_Environment &ACE_TRY_ENV);
- // Returns the object id of the current request being invoked. Can
- // raise the <CORBA::NoContext> exception if this function is not
- // invoked in the context of an upcall.
-
- TAO_POA_Current_Impl *implementation (void);
- // Returns the class that implements this interface.
-
- TAO_POA_Current_Impl *implementation (TAO_POA_Current_Impl *new_current);
- // Sets the thread-specific pointer to the new POA Current state,
- // returning a pointer to the existing POA Current state.
-};
-
-class TAO_Export TAO_POA_Current_Impl
-{
// = TITLE
//
- // Implementation of the PortableServer::Current object.
+ // Implementation of the PortableServer::Current object.
//
// = DESCRIPTION
//
- // Objects of this class hold state information regarding the
- // current POA invocation. Savvy readers will notice that this
- // contains substantially more methods than the POA spec shows;
- // they exist because the ORB either (a) needs them or (b) finds
- // them useful for implementing a more efficient ORB.
+ // Objects of this class hold state information regarding the
+ // current POA invocation. Savvy readers will notice that this
+ // contains substantially more methods than the POA spec shows; they
+ // exist because the ORB either (a) needs them or (b) finds them
+ // useful for implementing a more efficient ORB.
//
- // The intent is that instances of this class are held in
- // Thread-Specific Storage so that upcalls can get context
- // information regarding their invocation. The POA itself must
- // insure that all <set_*> operations are performed in the
- // execution thread so that the proper <TAO_POA_Current> pointer
- // is obtained from TSS.
+ // The intent is that instances of this class are held in
+ // Thread-Specific Storage so that upcalls can get context
+ // information regarding their invocation. The POA itself must
+ // insure that all <set_*> operations are performed in the execution
+ // thread so that the proper <TAO_POA_Current> pointer is obtained
+ // from TSS.
public:
friend class TAO_POA;
+ // = Specification-mandated methods
+
PortableServer::POA_ptr get_POA (CORBA_Environment &ACE_TRY_ENV);
// Return pointer to the invoking POA. Raises the
// <CORBA::NoContext> exception.
@@ -816,6 +753,17 @@ public:
// the guise of multiple object ids. This has _out semantics Raises
// the <CORBA::NoContext> exception.
+ // = TAO Extensions
+
+ void clear (void);
+ // Clear any prior settings made. This will make things which can
+ // throw the <CORBA::NoContext> exception raise it if invoked
+ // without a corresponding <set_*> operation.
+
+ int context_is_valid (void);
+ // Returns non-zero if the context is valid, i.e., if it would be
+ // impossible for a <CORBA::NoContext> exception to be raised.
+
void POA_impl (TAO_POA *impl);
// Set the POA implementation.
@@ -840,6 +788,9 @@ public:
PortableServer::Servant servant (void) const;
// Get the servant for the current upcall.
+ int in_upcall (void) const;
+ // Get whether we're in an upcall (non-zero is yes).
+
#if !defined (TAO_HAS_MINIMUM_CORBA)
PortableServer::ServantLocator::Cookie locator_cookie (void) const;
@@ -850,20 +801,17 @@ public:
#endif /* TAO_HAS_MINIMUM_CORBA */
- void active_object_map_entry (TAO_Active_Object_Map::Map_Entry *entry);
- // Set the <active_object_map_entry>.
+ TAO_POA_Current (void);
+ // Constructor
- TAO_Active_Object_Map::Map_Entry *active_object_map_entry (void) const;
- // Get the <active_object_map_entry>.
-
- TAO_POA_Current_Impl (TAO_POA *impl,
- const TAO_ObjectKey &key,
- PortableServer::Servant servant,
- const char *operation,
- TAO_ORB_Core &orb_core);
+ TAO_POA_Current (TAO_POA *impl,
+ const TAO_ObjectKey &key,
+ PortableServer::Servant servant,
+ const char *operation,
+ TAO_ORB_Core &orb_core);
// Convenience constructor combining construction & initialization.
- ~TAO_POA_Current_Impl (void);
+ ~TAO_POA_Current (void);
// Destructor
protected:
@@ -871,9 +819,7 @@ protected:
// The POA implementation invoking an upcall
PortableServer::ObjectId object_id_;
- // The object ID of the current context. This is the user id and
- // not the id the goes into the IOR. Note also that unlike the
- // <object_key>, this field is stored by value.
+ // The object ID of the current context.
const TAO_ObjectKey *object_key_;
// The object key of the current context.
@@ -894,16 +840,12 @@ protected:
TAO_ORB_Core *orb_core_;
// ORB Core for this current.
- TAO_POA_Current_Impl *previous_current_impl_;
+ TAO_POA_Current *previous_current_;
// Current previous from <this>.
- TAO_Active_Object_Map::Map_Entry *active_object_map_entry_;
- // Pointer to the entry in the TAO_Active_Object_Map corresponding
- // to the servant for this request.
-
// = Hidden because we don't allow these
- TAO_POA_Current_Impl (const TAO_POA_Current_Impl &);
- void operator= (const TAO_POA_Current_Impl &);
+ TAO_POA_Current (const TAO_POA_Current &);
+ void operator= (const TAO_POA_Current &);
};
#if defined (__ACE_INLINE__)