GOA.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    GOA.h
00006  *
00007  *  $Id: GOA.h 77001 2007-02-12 07:54:49Z johnnyw $
00008  *
00009  *  Header file for Group Object Adapter
00010  *
00011  *  @author  Several
00012  */
00013 //=============================================================================
00014 
00015 #ifndef TAO_GOA_H
00016 #define TAO_GOA_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "orbsvcs/PortableGroup/portablegroup_export.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #include "orbsvcs/PortableGroupC.h"
00027 #include "tao/PortableServer/Regular_POA.h"
00028 
00029 // This is to remove "inherits via dominance" warnings from MSVC.
00030 // MSVC is being a little too paranoid.
00031 #if defined(_MSC_VER)
00032 #pragma warning(push)
00033 #pragma warning(disable:4250)
00034 #endif /* _MSC_VER */
00035 
00036 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00037 
00038 class TAO_Profile;
00039 class TAO_PortableGroup_Acceptor_Registry;
00040 
00041 /**
00042  * @class TAO_GOA
00043  *
00044  * @brief Implementation of the PortableGroup::GOA interface.
00045  *
00046  * Implementation of the PortableGroup::GOA interface.
00047  */
00048 class TAO_PortableGroup_Export TAO_GOA :
00049     public virtual PortableGroup::GOA,
00050     public virtual TAO_Regular_POA
00051 {
00052 public:
00053   // Methods added by the
00054   /// @name MIOP specification methods
00055   //@{
00056   virtual PortableServer::ObjectId * create_id_for_reference (
00057       CORBA::Object_ptr the_ref
00058     );
00059 
00060 
00061   virtual PortableGroup::IDs * reference_to_ids (
00062       CORBA::Object_ptr the_ref
00063     );
00064 
00065   virtual void associate_reference_with_id (
00066       CORBA::Object_ptr ref,
00067       const PortableServer::ObjectId & oid
00068     );
00069 
00070   virtual void disassociate_reference_with_id (
00071       CORBA::Object_ptr ref,
00072       const PortableServer::ObjectId & oid
00073     );
00074   //@}
00075 
00076   // Standard POA interface methods
00077   PortableServer::POA_ptr create_POA (const char *adapter_name,
00078                                       PortableServer::POAManager_ptr poa_manager,
00079                                       const CORBA::PolicyList &policies);
00080 
00081   PortableServer::POA_ptr find_POA (const char *adapter_name,
00082                                     CORBA::Boolean activate_it);
00083 
00084   void destroy (CORBA::Boolean etherealize_objects,
00085                 CORBA::Boolean wait_for_completion);
00086 
00087 #if (TAO_HAS_MINIMUM_POA == 0)
00088 
00089   PortableServer::ThreadPolicy_ptr create_thread_policy (PortableServer::ThreadPolicyValue value);
00090 
00091 #endif /* TAO_HAS_MINIMUM_POA == 0 */
00092 
00093   PortableServer::LifespanPolicy_ptr create_lifespan_policy (PortableServer::LifespanPolicyValue value);
00094 
00095   PortableServer::IdUniquenessPolicy_ptr create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value);
00096 
00097   PortableServer::IdAssignmentPolicy_ptr create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value);
00098 
00099 #if (TAO_HAS_MINIMUM_POA == 0)
00100 
00101   PortableServer::ImplicitActivationPolicy_ptr create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value);
00102 
00103   PortableServer::ServantRetentionPolicy_ptr create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value);
00104 
00105   PortableServer::RequestProcessingPolicy_ptr create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value);
00106 
00107 #endif /* TAO_HAS_MINIMUM_POA == 0 */
00108 
00109   char * the_name (void);
00110 
00111   PortableServer::POA_ptr the_parent (void);
00112 
00113   PortableServer::POAList *the_children (void);
00114 
00115   PortableServer::POAManager_ptr the_POAManager (void);
00116 
00117 #if (TAO_HAS_MINIMUM_POA == 0)
00118 
00119   PortableServer::AdapterActivator_ptr the_activator (void);
00120 
00121   void the_activator (PortableServer::AdapterActivator_ptr adapter_activator);
00122 
00123   PortableServer::ServantManager_ptr get_servant_manager (void);
00124 
00125   void set_servant_manager (PortableServer::ServantManager_ptr imgr);
00126 
00127   PortableServer::Servant get_servant (void);
00128 
00129   void set_servant (PortableServer::Servant servant);
00130 
00131 #endif /* TAO_HAS_MINIMUM_POA == 0 */
00132 
00133   PortableServer::ObjectId *activate_object (PortableServer::Servant p_servant);
00134 
00135   void activate_object_with_id (const PortableServer::ObjectId &id,
00136                                 PortableServer::Servant p_servant);
00137 
00138   void deactivate_object (const PortableServer::ObjectId &oid);
00139 
00140   CORBA::Object_ptr create_reference (const char *intf);
00141 
00142   CORBA::Object_ptr create_reference_with_id (const PortableServer::ObjectId &oid,
00143                                               const char *intf);
00144 
00145   PortableServer::ObjectId *servant_to_id (PortableServer::Servant p_servant);
00146 
00147   CORBA::Object_ptr servant_to_reference (PortableServer::Servant p_servant);
00148 
00149   PortableServer::Servant reference_to_servant (CORBA::Object_ptr reference);
00150 
00151   PortableServer::ObjectId *reference_to_id (CORBA::Object_ptr reference);
00152 
00153   PortableServer::Servant id_to_servant (const PortableServer::ObjectId &oid);
00154 
00155   CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &oid);
00156 
00157   CORBA::OctetSeq *id (void);
00158 
00159   // End standard POA interface methods.
00160 
00161   TAO_GOA (const String &name,
00162            PortableServer::POAManager_ptr poa_manager,
00163            const TAO_POA_Policy_Set &policies,
00164            TAO_Root_POA *parent,
00165            ACE_Lock &lock,
00166            TAO_SYNCH_MUTEX &thread_lock,
00167            TAO_ORB_Core &orb_core,
00168            TAO_Object_Adapter *object_adapter);
00169 
00170   virtual ~TAO_GOA (void);
00171 
00172     // Used to force the initialization of the code.
00173     static int Initializer (void);
00174 
00175 protected:
00176 
00177   /// Template method for creating new POA's of this type.
00178   virtual TAO_Root_POA *new_POA (const String &name,
00179                                  PortableServer::POAManager_ptr poa_manager,
00180                             const TAO_POA_Policy_Set &policies,
00181                             TAO_Root_POA *parent,
00182                             ACE_Lock &lock,
00183                             TAO_SYNCH_MUTEX &thread_lock,
00184                             TAO_ORB_Core &orb_core,
00185                             TAO_Object_Adapter *object_adapter);
00186 
00187   int find_group_component (const CORBA::Object_ptr the_ref,
00188                             PortableGroup::TagGroupTaggedComponent &group);
00189 
00190   int find_group_component_in_profile (
00191       const TAO_Profile* profile,
00192       PortableGroup::TagGroupTaggedComponent &group
00193     );
00194 
00195   int create_group_acceptors (
00196       CORBA::Object_ptr the_ref,
00197       TAO_PortableGroup_Acceptor_Registry &acceptor_registry,
00198       TAO_ORB_Core &orb_core
00199     );
00200 
00201   /// Helper function to associate group references with
00202   /// object references.
00203   void associate_group_with_ref (
00204         CORBA::Object_ptr group_ref,
00205         CORBA::Object_ptr obj_ref);
00206 };
00207 
00208 TAO_END_VERSIONED_NAMESPACE_DECL
00209 
00210 // ****************************************************************
00211 
00212 #if defined(_MSC_VER)
00213 #pragma warning(pop)
00214 #endif /* _MSC_VER */
00215 
00216 #include /**/ "ace/post.h"
00217 
00218 #endif /* TAO_GOA_H */

Generated on Sun Jan 27 16:22:30 2008 for TAO_PortableGroup by doxygen 1.3.6