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 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00059 )
00060 ACE_THROW_SPEC ((
00061 CORBA::SystemException,
00062 PortableGroup::NotAGroupObject
00063 ));
00064
00065
00066 virtual PortableGroup::IDs * reference_to_ids (
00067 CORBA::Object_ptr the_ref
00068 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00069 )
00070 ACE_THROW_SPEC ((
00071 CORBA::SystemException,
00072 PortableGroup::NotAGroupObject
00073 ));
00074
00075 virtual void associate_reference_with_id (
00076 CORBA::Object_ptr ref,
00077 const PortableServer::ObjectId & oid
00078 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00079 )
00080 ACE_THROW_SPEC ((
00081 CORBA::SystemException,
00082 PortableGroup::NotAGroupObject
00083 ));
00084
00085 virtual void disassociate_reference_with_id (
00086 CORBA::Object_ptr ref,
00087 const PortableServer::ObjectId & oid
00088 ACE_ENV_ARG_DECL_WITH_DEFAULTS
00089 )
00090 ACE_THROW_SPEC ((
00091 CORBA::SystemException,
00092 PortableGroup::NotAGroupObject
00093 ));
00094
00095
00096
00097 PortableServer::POA_ptr create_POA (const char *adapter_name,
00098 PortableServer::POAManager_ptr poa_manager,
00099 const CORBA::PolicyList &policies
00100 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00101 ACE_THROW_SPEC ((CORBA::SystemException,
00102 PortableServer::POA::AdapterAlreadyExists,
00103 PortableServer::POA::InvalidPolicy));
00104
00105 PortableServer::POA_ptr find_POA (const char *adapter_name,
00106 CORBA::Boolean activate_it
00107 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00108 ACE_THROW_SPEC ((CORBA::SystemException,
00109 PortableServer::POA::AdapterNonExistent));
00110
00111 void destroy (CORBA::Boolean etherealize_objects,
00112 CORBA::Boolean wait_for_completion
00113 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00114 ACE_THROW_SPEC ((CORBA::SystemException));
00115
00116 #if (TAO_HAS_MINIMUM_POA == 0)
00117
00118 PortableServer::ThreadPolicy_ptr create_thread_policy (PortableServer::ThreadPolicyValue value
00119 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00120 ACE_THROW_SPEC ((CORBA::SystemException));
00121
00122 #endif
00123
00124 PortableServer::LifespanPolicy_ptr create_lifespan_policy (PortableServer::LifespanPolicyValue value
00125 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00126 ACE_THROW_SPEC ((CORBA::SystemException));
00127
00128 PortableServer::IdUniquenessPolicy_ptr create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value
00129 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00130 ACE_THROW_SPEC ((CORBA::SystemException));
00131
00132 PortableServer::IdAssignmentPolicy_ptr create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value
00133 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00134 ACE_THROW_SPEC ((CORBA::SystemException));
00135
00136 #if (TAO_HAS_MINIMUM_POA == 0)
00137
00138 PortableServer::ImplicitActivationPolicy_ptr create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value
00139 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00140 ACE_THROW_SPEC ((CORBA::SystemException));
00141
00142 PortableServer::ServantRetentionPolicy_ptr create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value
00143 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00144 ACE_THROW_SPEC ((CORBA::SystemException));
00145
00146 PortableServer::RequestProcessingPolicy_ptr create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value
00147 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00148 ACE_THROW_SPEC ((CORBA::SystemException));
00149
00150 #endif
00151
00152 char * the_name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00153 ACE_THROW_SPEC ((CORBA::SystemException));
00154
00155 PortableServer::POA_ptr the_parent (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00156 ACE_THROW_SPEC ((CORBA::SystemException));
00157
00158 PortableServer::POAList *the_children (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00159 ACE_THROW_SPEC ((CORBA::SystemException));
00160
00161 PortableServer::POAManager_ptr the_POAManager (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00162 ACE_THROW_SPEC ((CORBA::SystemException));
00163
00164 #if (TAO_HAS_MINIMUM_POA == 0)
00165
00166 PortableServer::AdapterActivator_ptr the_activator (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00167 ACE_THROW_SPEC ((CORBA::SystemException));
00168
00169 void the_activator (PortableServer::AdapterActivator_ptr adapter_activator
00170 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00171 ACE_THROW_SPEC ((CORBA::SystemException));
00172
00173 PortableServer::ServantManager_ptr get_servant_manager (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00174 ACE_THROW_SPEC ((CORBA::SystemException,
00175 PortableServer::POA::WrongPolicy));
00176
00177 void set_servant_manager (PortableServer::ServantManager_ptr imgr
00178 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00179 ACE_THROW_SPEC ((CORBA::SystemException,
00180 PortableServer::POA::WrongPolicy));
00181
00182 PortableServer::Servant get_servant (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00183 ACE_THROW_SPEC ((CORBA::SystemException,
00184 PortableServer::POA::NoServant,
00185 PortableServer::POA::WrongPolicy));
00186
00187 void set_servant (PortableServer::Servant servant
00188 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00189 ACE_THROW_SPEC ((CORBA::SystemException,
00190 PortableServer::POA::WrongPolicy));
00191
00192 #endif
00193
00194 PortableServer::ObjectId *activate_object (PortableServer::Servant p_servant
00195 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00196 ACE_THROW_SPEC ((CORBA::SystemException,
00197 PortableServer::POA::ServantAlreadyActive,
00198 PortableServer::POA::WrongPolicy));
00199
00200 void activate_object_with_id (const PortableServer::ObjectId &id,
00201 PortableServer::Servant p_servant
00202 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00203 ACE_THROW_SPEC ((CORBA::SystemException,
00204 PortableServer::POA::ServantAlreadyActive,
00205 PortableServer::POA::ObjectAlreadyActive,
00206 PortableServer::POA::WrongPolicy));
00207
00208 void deactivate_object (const PortableServer::ObjectId &oid
00209 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00210 ACE_THROW_SPEC ((CORBA::SystemException,
00211 PortableServer::POA::ObjectNotActive,
00212 PortableServer::POA::WrongPolicy));
00213
00214 CORBA::Object_ptr create_reference (const char *intf
00215 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00216 ACE_THROW_SPEC ((CORBA::SystemException,
00217 PortableServer::POA::WrongPolicy));
00218
00219 CORBA::Object_ptr create_reference_with_id (const PortableServer::ObjectId &oid,
00220 const char *intf
00221 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00222 ACE_THROW_SPEC ((CORBA::SystemException));
00223
00224 PortableServer::ObjectId *servant_to_id (PortableServer::Servant p_servant
00225 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00226 ACE_THROW_SPEC ((CORBA::SystemException,
00227 PortableServer::POA::ServantNotActive,
00228 PortableServer::POA::WrongPolicy));
00229
00230 CORBA::Object_ptr servant_to_reference (PortableServer::Servant p_servant
00231 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00232 ACE_THROW_SPEC ((CORBA::SystemException,
00233 PortableServer::POA::ServantNotActive,
00234 PortableServer::POA::WrongPolicy));
00235
00236 PortableServer::Servant reference_to_servant (CORBA::Object_ptr reference
00237 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00238 ACE_THROW_SPEC ((CORBA::SystemException,
00239 PortableServer::POA::ObjectNotActive,
00240 PortableServer::POA::WrongAdapter,
00241 PortableServer::POA::WrongPolicy));
00242
00243 PortableServer::ObjectId *reference_to_id (CORBA::Object_ptr reference
00244 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00245 ACE_THROW_SPEC ((CORBA::SystemException,
00246 PortableServer::POA::WrongAdapter,
00247 PortableServer::POA::WrongPolicy));
00248
00249 PortableServer::Servant id_to_servant (const PortableServer::ObjectId &oid
00250 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00251 ACE_THROW_SPEC ((CORBA::SystemException,
00252 PortableServer::POA::ObjectNotActive,
00253 PortableServer::POA::WrongPolicy));
00254
00255 CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &oid
00256 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00257 ACE_THROW_SPEC ((CORBA::SystemException,
00258 PortableServer::POA::ObjectNotActive,
00259 PortableServer::POA::WrongPolicy));
00260
00261 CORBA::OctetSeq *id (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00262 ACE_THROW_SPEC ((CORBA::SystemException));
00263
00264
00265
00266 TAO_GOA (const String &name,
00267 PortableServer::POAManager_ptr poa_manager,
00268 const TAO_POA_Policy_Set &policies,
00269 TAO_Root_POA *parent,
00270 ACE_Lock &lock,
00271 TAO_SYNCH_MUTEX &thread_lock,
00272 TAO_ORB_Core &orb_core,
00273 TAO_Object_Adapter *object_adapter
00274 ACE_ENV_ARG_DECL);
00275
00276 virtual ~TAO_GOA (void);
00277
00278
00279 static int Initializer (void);
00280
00281 protected:
00282
00283
00284 virtual TAO_Root_POA *new_POA (const String &name,
00285 PortableServer::POAManager_ptr poa_manager,
00286 const TAO_POA_Policy_Set &policies,
00287 TAO_Root_POA *parent,
00288 ACE_Lock &lock,
00289 TAO_SYNCH_MUTEX &thread_lock,
00290 TAO_ORB_Core &orb_core,
00291 TAO_Object_Adapter *object_adapter
00292 ACE_ENV_ARG_DECL);
00293
00294 int find_group_component (const CORBA::Object_ptr the_ref,
00295 PortableGroup::TagGroupTaggedComponent &group);
00296
00297 int find_group_component_in_profile (
00298 const TAO_Profile* profile,
00299 PortableGroup::TagGroupTaggedComponent &group
00300 );
00301
00302 int create_group_acceptors (
00303 CORBA::Object_ptr the_ref,
00304 TAO_PortableGroup_Acceptor_Registry &acceptor_registry,
00305 TAO_ORB_Core &orb_core
00306 ACE_ENV_ARG_DECL
00307 );
00308
00309
00310
00311 void associate_group_with_ref (
00312 CORBA::Object_ptr group_ref,
00313 CORBA::Object_ptr obj_ref
00314 ACE_ENV_ARG_DECL)
00315 ACE_THROW_SPEC ((CORBA::SystemException,
00316 PortableGroup::NotAGroupObject));
00317 };
00318
00319 TAO_END_VERSIONED_NAMESPACE_DECL
00320
00321
00322
00323 #if defined(_MSC_VER)
00324 #pragma warning(pop)
00325 #endif
00326
00327 #include "ace/post.h"
00328
00329 #endif