summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/POA.h
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-16 21:19:02 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-16 21:19:02 +0000
commit40fdc8a404e75ab03b68cc62e9987cf208fd8c30 (patch)
tree37d9c4d3abe4aefd8a34ed797883dd2cd4862ca7 /TAO/tao/PortableServer/POA.h
parentc254b281f1b9a4ca19dd0c3ee73a0654a7718909 (diff)
downloadATCD-40fdc8a404e75ab03b68cc62e9987cf208fd8c30.tar.gz
This commit was manufactured by cvs2svn to create branchtypecode-overhaul
'typecode-overhaul'.
Diffstat (limited to 'TAO/tao/PortableServer/POA.h')
-rw-r--r--TAO/tao/PortableServer/POA.h180
1 files changed, 55 insertions, 125 deletions
diff --git a/TAO/tao/PortableServer/POA.h b/TAO/tao/PortableServer/POA.h
index 6de036d8770..a3c7f13b7b6 100644
--- a/TAO/tao/PortableServer/POA.h
+++ b/TAO/tao/PortableServer/POA.h
@@ -42,9 +42,12 @@
#include "tao/LocalObject.h"
// Portable Interceptor
-#include "tao/PI_ForwardC.h"
+#include "tao/PortableInterceptorC.h"
+// Map
#include "ace/Hash_Map_Manager_T.h"
+
+// ACE_Array_Base
#include "ace/Array_Base.h"
// Locking
@@ -56,8 +59,6 @@
// OctetSeq
#include "tao/OctetSeqC.h"
-#include "ORT_Adapter.h"
-
// This is to remove "inherits via dominance" warnings from MSVC.
// MSVC is being a little too paranoid.
#if defined(_MSC_VER)
@@ -67,11 +68,15 @@
#pragma warning(disable:4250)
#endif /* _MSC_VER */
+class TAO_Acceptor_Filter;
+class TAO_Acceptor_Registry;
class TAO_Temporary_Creation_Time;
+class TAO_ObjectReferenceTemplate;
class TAO_Creation_Time
{
public:
+
TAO_Creation_Time (const ACE_Time_Value &creation_time);
TAO_Creation_Time (void);
@@ -131,9 +136,6 @@ protected:
// Forward Declaration
class ServerObject_i;
-class TAO_Acceptor_Filter;
-class TAO_Acceptor_Registry;
-class TAO_IORInfo;
namespace PortableInterceptor
{
@@ -141,12 +143,6 @@ namespace PortableInterceptor
typedef IORInfo *IORInfo_ptr;
}
-namespace TAO
-{
- class ORT_Adapter;
- class ORT_Adapter_Factory;
-}
-
/**
* @class TAO_POA
*
@@ -166,7 +162,7 @@ public:
friend class TAO_POA_Current_Impl;
friend class TAO_POA_Manager;
friend class TAO_RT_Collocation_Resolver;
- friend class TAO_IORInfo;
+ friend class TAO_ObjectReferenceTemplate;
typedef ACE_CString String;
@@ -276,6 +272,20 @@ public:
PortableInterceptor::AdapterName *adapter_name (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
+ /// Accessor methods to ObjectReferenceTemplate
+ PortableInterceptor::ObjectReferenceTemplate * get_adapter_template (void);
+
+ void set_adapter_template (PortableInterceptor::ObjectReferenceTemplate *
+ object_ref_template
+ ACE_ENV_ARG_DECL);
+
+ /// Accessor methods to PortableInterceptor::ObjectReferenceFactory
+ PortableInterceptor::ObjectReferenceFactory * get_obj_ref_factory (void);
+
+ void set_obj_ref_factory (
+ PortableInterceptor::ObjectReferenceFactory *current_factory
+ ACE_ENV_ARG_DECL);
+
/// Store the given TaggedComponent for eventual insertion into all
/// object reference profiles.
void save_ior_component (const IOP::TaggedComponent &component
@@ -396,9 +406,8 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException));
#if (TAO_HAS_MINIMUM_POA == 0)
- // Methods added by the
- /// @name MIOP specification methods
- //@{
+ // Methods added by the MIOP specification.
+
virtual PortableServer::ObjectId * create_id_for_reference (
CORBA::Object_ptr the_ref
ACE_ENV_ARG_DECL_WITH_DEFAULTS
@@ -437,23 +446,26 @@ public:
CORBA::SystemException,
PortableServer::NotAGroupObject
));
- //@}
+
+ // End methods added by MIOP.
#endif /* TAO_HAS_MINIMUM_POA == 0 */
+
/// Accessor for POA policies.
TAO_POA_Policy_Set &policies (void);
/// Accessor for cached POA policies.
TAO_POA_Cached_Policies &cached_policies (void);
- /// This method gives the policies that are exposed to the client.
- /// These policies are shipped within the IOR.
virtual CORBA::PolicyList *client_exposed_policies (
CORBA::Short object_priority
ACE_ENV_ARG_DECL
);
+ // This method gives the policies that are exposed to the client.
+ // These policies are shipped within the IOR.
+
- /// Utility functions for the other
+ // Utility functions for the other
static char* ObjectId_to_string (const PortableServer::ObjectId &id);
static CORBA::WChar* ObjectId_to_wstring (
@@ -507,9 +519,9 @@ public:
CORBA::Boolean cleanup_in_progress (void);
- /// Calls protected static method used when POACurrent is not appropriate.
static int parse_ir_object_key (const TAO::ObjectKey &object_key,
PortableServer::ObjectId &user_id);
+ // Calls protected static method used when POACurrent is not appropriate.
TAO_Object_Adapter &object_adapter (void);
@@ -546,12 +558,6 @@ public:
CORBA::Boolean waiting_destruction (void) const;
- static void ort_adapter_factory_name (const char *name);
-
- static const char *ort_adapter_factory_name (void);
-
- CORBA::Object_ptr invoke_key_to_object (ACE_ENV_SINGLE_ARG_DECL);
-
protected:
/// Template method for creating new POA's of this type.
@@ -608,9 +614,10 @@ protected:
/// Method to notify the IOR Interceptors when there is a state
/// changed not related to POAManager.
void adapter_state_changed (
- const TAO::ORT_Array &array_obj_ref_template,
+ const PortableInterceptor::ObjectReferenceTemplateSeq &seq_obj_ref_template,
PortableInterceptor::AdapterState state
- ACE_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL
+ )
ACE_THROW_SPEC ((CORBA::SystemException));
/// Add the given tagged component to all profiles.
@@ -652,32 +659,35 @@ protected:
#endif /* TAO_HAS_MINIMUM_POA == 0 */
+//
+// ImplRepo related.
+//
#if (TAO_HAS_MINIMUM_CORBA == 0)
- /// @name Implementation repository related methods
- //@{
- /// ImplRepo helper method, notify the ImplRepo on startup
void imr_notify_startup (ACE_ENV_SINGLE_ARG_DECL);
+ // ImplRepo helper method, notify the ImplRepo on startup
- /// ImplRepo helper method, notify the ImplRepo on shutdown
void imr_notify_shutdown (void);
- //@}
+ // ImplRepo helper method, notify the ImplRepo on shutdown
+
#endif /* TAO_HAS_MINIMUM_CORBA */
- /// Wrapper for the ORB's key_to_object that will alter the object pointer
- /// if the ImplRepo is used.
+ CORBA::Object_ptr invoke_key_to_object (ACE_ENV_SINGLE_ARG_DECL);
+
CORBA::Object_ptr key_to_object (const TAO::ObjectKey &key,
const char *type_id,
TAO_ServantBase *servant,
CORBA::Boolean collocated,
CORBA::Short priority
ACE_ENV_ARG_DECL);
+ // Wrapper for the ORB's key_to_object that will alter the object pointer
+ // if the ImplRepo is used.
- /// Like key_to_stub() but assume that the ORB is not shutting down.
virtual TAO_Stub* key_to_stub_i (const TAO::ObjectKey &key,
const char *type_id,
CORBA::Short priority
ACE_ENV_ARG_DECL);
+ // Like key_to_stub() but assume that the ORB is not shutting down.
TAO_Stub *create_stub_object (const TAO::ObjectKey &object_key,
const char *type_id,
@@ -850,24 +860,6 @@ protected:
static TAO_POA_Policy_Set &default_poa_policies (void);
protected:
- /// Accessor methods to ObjectReferenceTemplate
- PortableInterceptor::ObjectReferenceTemplate *
- get_adapter_template (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Accessor methods to ObjectReferenceTemplate, non locked version
- PortableInterceptor::ObjectReferenceTemplate *get_adapter_template_i (void);
-
- /// Accessor methods to PortableInterceptor::ObjectReferenceFactory
- PortableInterceptor::ObjectReferenceFactory *
- get_obj_ref_factory (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Set the object reference factory
- void set_obj_ref_factory (
- PortableInterceptor::ObjectReferenceFactory *current_factory
- ACE_ENV_ARG_DECL);
-
TAO_SERVANT_LOCATION locate_servant_i (const PortableServer::ObjectId &id,
PortableServer::Servant &servant
@@ -882,23 +874,6 @@ protected:
ACE_ENV_ARG_DECL
);
- CORBA::Object_ptr
- invoke_key_to_object_helper_i (const char * repository_id,
- const PortableServer::ObjectId & id
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Get the ORT adapter, in case there is no adapter yet, this method will
- /// try to create one and hold the POA lock
- TAO::ORT_Adapter *ORT_adapter (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Get the ORT adapter, in case there is no adapter yet, this method will
- /// try to create one but assumes the POA lock is already hole
- TAO::ORT_Adapter *ORT_adapter_i (void);
-
- TAO::ORT_Adapter_Factory *ORT_adapter_factory (void);
-
const TAO_Creation_Time &creation_time (void);
CORBA::Boolean persistent (void);
@@ -961,8 +936,13 @@ protected:
CORBA::OctetSeq id_;
- /// Pointer to the object reference template adapter.
- TAO::ORT_Adapter *ort_adapter_;
+ /// Keep a copy of the pointer to the actual implementation around
+ /// so that we can call some TAO-specific methods on it.
+ TAO_ObjectReferenceTemplate * def_ort_template_;
+
+ PortableInterceptor::ObjectReferenceTemplate_var ort_template_;
+
+ PortableInterceptor::ObjectReferenceFactory_var obj_ref_factory_;
/// Adapter can be accepting, rejecting etc.
PortableInterceptor::AdapterState adapter_state_;
@@ -1010,7 +990,7 @@ protected:
TAO_ORB_Core &orb_core_;
- /// The object adapter we belong to
+ // The object adapter we belong to
TAO_Object_Adapter *object_adapter_;
CORBA::Boolean cleanup_in_progress_;
@@ -1094,56 +1074,6 @@ protected:
#endif /* TAO_HAS_MINIMUM_POA == 0 */
-/**
- * @class TAO_POA_Static_Resources
- *
- * @brief The static (global) resoures of all POA's.
- *
- * This class is used by the POA to store the resources global to
- * all POA's. All instance variables that would have been
- * declared "static" in TAO_POA, should be declared in this class
- * to avoid the "static initialization order fiasco" as described in
- * http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.11.
- * Briefly, this is the problem that occurs if any static initializers
- * in any other code call into set static members of TAO_POA.
- * Since the order in which these initializers execute is unspecified,
- * uninitialized members can be accessed.
- */
-class TAO_PortableServer_Export TAO_POA_Static_Resources
-{
-public:
-
- /// Return the singleton instance.
- static TAO_POA_Static_Resources* instance (void);
-
-public:
-
- /**
- * Name of the factory object used to adapt function calls on the
- * PortableInterceptor interfaces ORT. The default value is
- * "ObjectReferenceTemplate_Adapter_Factory". If the ORT library is linked,
- * the corresponding accessor function
- * objectreferencefactory_adapter_factory_name() will be called to set
- * the value to "Concrete_ObjectReferenceTemplate_Adapter_Factory".
- */
- ACE_CString ort_adapter_factory_name_;
-
-private:
- /// Constructor.
- TAO_POA_Static_Resources (void);
-
-private:
- /// The singleton instance.
- static TAO_POA_Static_Resources* instance_;
-
- /// Mostly unused variable whose sole purpose is to enforce
- /// the instantiation of a TAO_POA_Static_Resources instance
- /// at initialization time.
- static TAO_POA_Static_Resources* initialization_reference_;
-};
-
-// ****************************************************************
-
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma warning(pop)
#endif /* _MSC_VER */