00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
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
00025
00026 #include "orbsvcs/PortableGroupC.h"
00027 #include "tao/PortableServer/Regular_POA.h"
00028
00029
00030
00031 #if defined(_MSC_VER)
00032 #pragma warning(push)
00033 #pragma warning(disable:4250)
00034 #endif
00035
00036 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00037
00038 class TAO_Profile;
00039 class TAO_PortableGroup_Acceptor_Registry;
00040
00041
00042
00043
00044
00045
00046
00047
00048 class TAO_PortableGroup_Export TAO_GOA :
00049 public virtual PortableGroup::GOA,
00050 public virtual TAO_Regular_POA
00051 {
00052 public:
00053
00054
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
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
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
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
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
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
00173 static int Initializer (void);
00174
00175 protected:
00176
00177
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
00202
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
00215
00216 #include "ace/post.h"
00217
00218 #endif