diff options
author | Sumant Tambe <sutambe@users.noreply.github.com> | 2006-10-06 23:39:59 +0000 |
---|---|---|
committer | Sumant Tambe <sutambe@users.noreply.github.com> | 2006-10-06 23:39:59 +0000 |
commit | 348ab797a2fd66b151d4646526e7faf2074dc673 (patch) | |
tree | 6acc9c4a6e6c665ea024d92d40a96e4d93f6a42f | |
parent | d2ccf1aca86c5c0a2a4046fe9c9dd348ff4ad5b6 (diff) | |
download | ATCD-348ab797a2fd66b151d4646526e7faf2074dc673.tar.gz |
-rw-r--r-- | CIAO/examples/RT1H/Benchmark_Data_Collector_Ex_svnt.cpp | 1409 | ||||
-rw-r--r-- | CIAO/examples/RT1H/Benchmark_Data_Collector_Ex_svnt.h | 577 | ||||
-rw-r--r-- | CIAO/examples/RT1H/Benchmark_Data_Collector_svnt.cpp | 1203 | ||||
-rw-r--r-- | CIAO/examples/RT1H/Benchmark_Data_Collector_svnt.h | 508 |
4 files changed, 3697 insertions, 0 deletions
diff --git a/CIAO/examples/RT1H/Benchmark_Data_Collector_Ex_svnt.cpp b/CIAO/examples/RT1H/Benchmark_Data_Collector_Ex_svnt.cpp new file mode 100644 index 00000000000..6bea3a906c6 --- /dev/null +++ b/CIAO/examples/RT1H/Benchmark_Data_Collector_Ex_svnt.cpp @@ -0,0 +1,1409 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "Benchmark_Data_Collector_Ex_svnt.h" +#include "Cookies.h" +#include "ciao/Servant_Activator.h" +#include "ciao/Port_Activator_T.h" +#include "ace/SString.h" + +namespace CIAO_FACET_CUTS +{ + template <typename T> + Testing_Service_Servant_T<T>::Testing_Service_Servant_T ( + ::CUTS::CCM_Testing_Service_ptr executor, + ::Components::CCMContext_ptr c) + : executor_ ( ::CUTS::CCM_Testing_Service::_duplicate (executor)), + ctx_ ( ::Components::CCMContext::_duplicate (c)) + { + } + + template <typename T> + Testing_Service_Servant_T<T>::~Testing_Service_Servant_T (void) + { + } + + template <typename T> + ::CORBA::Long + Testing_Service_Servant_T<T>::register_component ( + const ::CUTS::Component_Registration & cr + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::Registration_Failed, + ::CUTS::Registration_Limit)) + { + return this->executor_->register_component ( + cr + ACE_ENV_ARG_PARAMETER); + } + + template <typename T> + void + Testing_Service_Servant_T<T>::unregister_component ( + const ::CUTS::Component_Registration & cr + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found)) + { + this->executor_->unregister_component ( + cr + ACE_ENV_ARG_PARAMETER); + } + + template <typename T> + ::CORBA::Object_ptr + Testing_Service_Servant_T<T>::_get_component ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::SessionContext_var sc = + ::Components::SessionContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (sc.in ())) + { + return sc->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ::Components::EntityContext_var ec = + ::Components::EntityContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (ec.in ())) + { + return ec->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ACE_THROW_RETURN ( ::CORBA::INTERNAL (), 0); + } +} + +namespace CIAO_FACET_CUTS +{ + template <typename T> + Path_Measurement_Servant_T<T>::Path_Measurement_Servant_T ( + ::CUTS::CCM_Path_Measurement_ptr executor, + ::Components::CCMContext_ptr c) + : executor_ ( ::CUTS::CCM_Path_Measurement::_duplicate (executor)), + ctx_ ( ::Components::CCMContext::_duplicate (c)) + { + } + + template <typename T> + Path_Measurement_Servant_T<T>::~Path_Measurement_Servant_T (void) + { + } + + template <typename T> + ::CORBA::Long + Path_Measurement_Servant_T<T>::bind_to_path ( + const ::CUTS::Path_Sequence & path, + ::CORBA::UShort flags + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::Binding_Failed)) + { + return this->executor_->bind_to_path ( + path, + flags + ACE_ENV_ARG_PARAMETER); + } + + template <typename T> + void + Path_Measurement_Servant_T<T>::unbind_to_path ( + ::CORBA::Long path_id + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found)) + { + this->executor_->unbind_to_path ( + path_id + ACE_ENV_ARG_PARAMETER); + } + + template <typename T> + ::CUTS::Event_Time_Info + Path_Measurement_Servant_T<T>::execution_time ( + ::CORBA::Long path_id + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found, + ::CUTS::Operation_Failed)) + { + return this->executor_->execution_time ( + path_id + ACE_ENV_ARG_PARAMETER); + } + + template <typename T> + ::CORBA::Object_ptr + Path_Measurement_Servant_T<T>::_get_component ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::SessionContext_var sc = + ::Components::SessionContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (sc.in ())) + { + return sc->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ::Components::EntityContext_var ec = + ::Components::EntityContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (ec.in ())) + { + return ec->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ACE_THROW_RETURN ( ::CORBA::INTERNAL (), 0); + } +} + +namespace CIAO_FACET_CUTS +{ + template <typename T> + BDC_Control_Handle_Servant_T<T>::BDC_Control_Handle_Servant_T ( + ::CUTS::CCM_BDC_Control_Handle_ptr executor, + ::Components::CCMContext_ptr c) + : executor_ ( ::CUTS::CCM_BDC_Control_Handle::_duplicate (executor)), + ctx_ ( ::Components::CCMContext::_duplicate (c)) + { + } + + template <typename T> + BDC_Control_Handle_Servant_T<T>::~BDC_Control_Handle_Servant_T (void) + { + } + + template <typename T> + void + BDC_Control_Handle_Servant_T<T>::collect_performance_data ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + this->executor_->collect_performance_data ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + template <typename T> + ::CORBA::Object_ptr + BDC_Control_Handle_Servant_T<T>::_get_component ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::SessionContext_var sc = + ::Components::SessionContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (sc.in ())) + { + return sc->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ::Components::EntityContext_var ec = + ::Components::EntityContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (ec.in ())) + { + return ec->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ACE_THROW_RETURN ( ::CORBA::INTERNAL (), 0); + } +} + +namespace CIAO_FACET_CUTS +{ + template <typename T> + Database_Service_Servant_T<T>::Database_Service_Servant_T ( + ::CUTS::CCM_Database_Service_ptr executor, + ::Components::CCMContext_ptr c) + : executor_ ( ::CUTS::CCM_Database_Service::_duplicate (executor)), + ctx_ ( ::Components::CCMContext::_duplicate (c)) + { + } + + template <typename T> + Database_Service_Servant_T<T>::~Database_Service_Servant_T (void) + { + } + + template <typename T> + ::CORBA::Long + Database_Service_Servant_T<T>::create_new_test ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return this->executor_->create_new_test ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + template <typename T> + void + Database_Service_Servant_T<T>::stop_current_test ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + this->executor_->stop_current_test ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + template <typename T> + ::CORBA::Long + Database_Service_Servant_T<T>::current_test ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return this->executor_->current_test ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + template <typename T> + ::CORBA::Object_ptr + Database_Service_Servant_T<T>::_get_component ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::SessionContext_var sc = + ::Components::SessionContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (sc.in ())) + { + return sc->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ::Components::EntityContext_var ec = + ::Components::EntityContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (ec.in ())) + { + return ec->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ACE_THROW_RETURN ( ::CORBA::INTERNAL (), 0); + } +} + +namespace CUTS +{ + namespace CIDL_Benchmark_Data_Collector_Ex_Impl + { + Benchmark_Data_Collector_Ex_Context::Benchmark_Data_Collector_Ex_Context ( + ::Components::CCMHome_ptr h, + ::CIAO::Session_Container *c, + Benchmark_Data_Collector_Ex_Servant *sv) + : ::CIAO::Context_Impl_Base (h, c), + ::CIAO::Context_Impl< + ::CUTS::CCM_Benchmark_Data_Collector_Ex_Context, + Benchmark_Data_Collector_Ex_Servant, + ::CUTS::Benchmark_Data_Collector_Ex, + ::CUTS::Benchmark_Data_Collector_Ex_var + > (h, c, sv) + { + } + + Benchmark_Data_Collector_Ex_Context::~Benchmark_Data_Collector_Ex_Context (void) + { + } + + // Operations for Benchmark_Data_Collector_Ex receptacles and event sources, + // defined in ::CUTS::CCM_Benchmark_Data_Collector_Ex_Context. + + void + Benchmark_Data_Collector_Ex_Context::push_collection_done ( + ::CUTS::Collection_Statistics *ev + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + for (ACE_Active_Map_Manager< + ::CUTS::Collection_StatisticsConsumer_var>::iterator iter = + this->ciao_publishes_collection_done_map_.begin (); + iter != this->ciao_publishes_collection_done_map_.end (); + ++iter) + { + (*iter).int_id_->push_Collection_Statistics ( + ev + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + for (ACE_Active_Map_Manager< + ::Components::EventConsumerBase_var>::iterator giter = + this->ciao_publishes_collection_done_generic_map_.begin (); + giter != this->ciao_publishes_collection_done_generic_map_.end (); + ++giter) + { + (*giter).int_id_->push_event ( + ev + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + } + + ::Components::Cookie * + Benchmark_Data_Collector_Ex_Context::subscribe_collection_done ( + ::CUTS::Collection_StatisticsConsumer_ptr c + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)) + { + if ( ::CORBA::is_nil (c)) + { + ACE_THROW_RETURN ( ::CORBA::BAD_PARAM (), 0); + } + + ::CUTS::Collection_StatisticsConsumer_var sub = + ::CUTS::Collection_StatisticsConsumer::_duplicate (c); + + ACE_Active_Map_Manager_Key key; + this->ciao_publishes_collection_done_map_.bind (sub.in (), key); + sub._retn (); + + ::Components::Cookie * retv = 0; + ACE_NEW_THROW_EX (retv, + ::CIAO::Map_Key_Cookie (key), + ::CORBA::NO_MEMORY ()); + + return retv; + } + + ::Components::Cookie * + Benchmark_Data_Collector_Ex_Context::subscribe_collection_done_generic ( + ::Components::EventConsumerBase_ptr c + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)) + { + if ( ::CORBA::is_nil (c)) + { + ACE_THROW_RETURN ( ::CORBA::BAD_PARAM (), 0); + } + + ::Components::EventConsumerBase_var sub = + ::Components::EventConsumerBase::_duplicate (c); + + ACE_Active_Map_Manager_Key key; + this->ciao_publishes_collection_done_generic_map_.bind (sub.in (), key); + sub._retn (); + + ::Components::Cookie * retv = 0; + ACE_NEW_THROW_EX (retv, + ::CIAO::Map_Key_Cookie (key), + ::CORBA::NO_MEMORY ()); + + return retv; + } + + ::CUTS::Collection_StatisticsConsumer_ptr + Benchmark_Data_Collector_Ex_Context::unsubscribe_collection_done ( + ::Components::Cookie *ck + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidConnection)) + { + ACE_Active_Map_Manager_Key key; + + if (ck == 0 || ::CIAO::Map_Key_Cookie::extract (ck, key) == false) + { + ACE_THROW_RETURN ( ::Components::InvalidConnection (), + ::CUTS::Collection_StatisticsConsumer::_nil ()); + } + + ::CUTS::Collection_StatisticsConsumer_var retv; + if (this->ciao_publishes_collection_done_map_.unbind (key, retv) == 0) + { + return retv._retn (); + } + + ::Components::EventConsumerBase_var ecb; + + if (this->ciao_publishes_collection_done_generic_map_.unbind (key, ecb) != 0) + { + ACE_THROW_RETURN ( ::Components::InvalidConnection (), + ::CUTS::Collection_StatisticsConsumer::_nil ()); + } + + return ::CUTS::Collection_StatisticsConsumer::_nil (); + } + + // CIAO-specific. + + Benchmark_Data_Collector_Ex_Context * + Benchmark_Data_Collector_Ex_Context::_narrow ( + ::Components::SessionContext_ptr p + ACE_ENV_ARG_DECL_NOT_USED) + { + return dynamic_cast<Benchmark_Data_Collector_Ex_Context *> (p); + } + + Benchmark_Data_Collector_Ex_Servant::Benchmark_Data_Collector_Ex_Servant ( + ::CUTS::CCM_Benchmark_Data_Collector_Ex_ptr exe, + ::Components::CCMHome_ptr h, + const char *ins_name, + ::CIAO::Home_Servant_Impl_Base *hs, + ::CIAO::Session_Container *c, + ::CIAO::REC_POL_MAP &rec_pol_map) + : ::CIAO::Servant_Impl_Base (h, hs, c, rec_pol_map), + ::CIAO::Servant_Impl< + ::POA_CUTS::Benchmark_Data_Collector_Ex, + ::CUTS::CCM_Benchmark_Data_Collector_Ex, + Benchmark_Data_Collector_Ex_Context + > (exe, h, hs, c, rec_pol_map), + ins_name_ (ins_name) + { + ACE_NEW (this->context_, + Benchmark_Data_Collector_Ex_Context (h, c, this)); + + // Set the instance id of the component on the context + + this->context_->_ciao_instance_id (this->ins_name_); + + ACE_TRY_NEW_ENV + { + ::Components::SessionComponent_var scom = + ::Components::SessionComponent::_narrow ( + exe + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (! ::CORBA::is_nil (scom.in ())) + { + scom->set_session_context ( + this->context_ + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + + this->populate_port_tables ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + + ACE_CATCHANY + { + } + + ACE_ENDTRY; + } + + Benchmark_Data_Collector_Ex_Servant::~Benchmark_Data_Collector_Ex_Servant (void) + { + } + + void + Benchmark_Data_Collector_Ex_Servant::set_attributes ( + const ::Components::ConfigValues &descr + ACE_ENV_ARG_DECL) + { + ACE_ENV_EMIT_CODE (ACE_UNUSED_ARG (ACE_TRY_ENV)); + + for ( ::CORBA::ULong i = 0; i < descr.length (); ++i) + { + const char *descr_name = descr[i]->name (); + ::CORBA::Any &descr_value = descr[i]->value (); + + if (ACE_OS::strcmp (descr_name, "timeout") == 0) + { + ::CORBA::Long _ciao_extract_val = 0; + descr_value >>= _ciao_extract_val; + this->timeout (_ciao_extract_val); + continue; + } + + if (ACE_OS::strcmp (descr_name, "collection_threads") == 0) + { + ::CORBA::Long _ciao_extract_val = 0; + descr_value >>= _ciao_extract_val; + this->collection_threads (_ciao_extract_val); + continue; + } + + if (ACE_OS::strcmp (descr_name, "metrics_outfile") == 0) + { + const char * _ciao_extract_val = 0; + descr_value >>= _ciao_extract_val; + this->metrics_outfile (_ciao_extract_val); + continue; + } + + if (ACE_OS::strcmp (descr_name, "server_name") == 0) + { + const char * _ciao_extract_val = 0; + descr_value >>= _ciao_extract_val; + this->server_name (_ciao_extract_val); + continue; + } + + ACE_UNUSED_ARG (descr_name); + ACE_UNUSED_ARG (descr_value); + } + } + + ::CUTS::Testing_Service_ptr + Benchmark_Data_Collector_Ex_Servant::provide_testing_service ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + if (! ::CORBA::is_nil (this->provide_testing_service_.in ())) + { + return ::CUTS::Testing_Service::_duplicate (this->provide_testing_service_.in ()); + } + + ::CORBA::Object_var obj = + this->provide_testing_service_i (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Testing_Service::_nil ()); + + ::CUTS::Testing_Service_var fo = + ::CUTS::Testing_Service::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Testing_Service::_nil ()); + + this->provide_testing_service_ = fo; + return ::CUTS::Testing_Service::_duplicate (this->provide_testing_service_.in ()); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Ex_Servant::provide_testing_service_i ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::CORBA::Object_ptr ret = + this->lookup_facet ("testing_service"); + + if (! ::CORBA::is_nil (ret)) + { + return ret; + } + + ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::Testing_Service_Servant, + ::CUTS::CCM_Testing_Service, + ::Components::CCMContext, + Benchmark_Data_Collector_Ex_Servant + > *tmp = 0; + + typedef ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::Testing_Service_Servant, + ::CUTS::CCM_Testing_Service, + ::Components::CCMContext, + Benchmark_Data_Collector_Ex_Servant + > + MACRO_MADNESS_TYPEDEF; + + ACE_CString obj_id (this->ins_name_); + obj_id += "_testing_service"; + + ACE_NEW_THROW_EX (tmp, + MACRO_MADNESS_TYPEDEF ( + obj_id.c_str (), + "testing_service", + ::CIAO::Port_Activator::Facet, + 0, + this->context_, + this), + ::CORBA::NO_MEMORY ()); + + ::CIAO::Servant_Activator *sa = + this->container_->ports_servant_activator (); + + if (!sa->register_port_activator (tmp)) + { + return ::CUTS::Testing_Service::_nil (); + } + + ::CORBA::Object_var obj = + this->container_->generate_reference ( + obj_id.c_str (), + "IDL:CUTS/Testing_Service:1.0", + ::CIAO::Container::Facet_Consumer + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Testing_Service::_nil ()); + + this->add_facet ("testing_service", + obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Testing_Service::_nil ()); + + return obj._retn (); + } + + ::CUTS::Path_Measurement_ptr + Benchmark_Data_Collector_Ex_Servant::provide_online_measurements ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + if (! ::CORBA::is_nil (this->provide_online_measurements_.in ())) + { + return ::CUTS::Path_Measurement::_duplicate (this->provide_online_measurements_.in ()); + } + + ::CORBA::Object_var obj = + this->provide_online_measurements_i (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Path_Measurement::_nil ()); + + ::CUTS::Path_Measurement_var fo = + ::CUTS::Path_Measurement::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Path_Measurement::_nil ()); + + this->provide_online_measurements_ = fo; + return ::CUTS::Path_Measurement::_duplicate (this->provide_online_measurements_.in ()); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Ex_Servant::provide_online_measurements_i ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::CORBA::Object_ptr ret = + this->lookup_facet ("online_measurements"); + + if (! ::CORBA::is_nil (ret)) + { + return ret; + } + + ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::Path_Measurement_Servant, + ::CUTS::CCM_Path_Measurement, + ::Components::CCMContext, + Benchmark_Data_Collector_Ex_Servant + > *tmp = 0; + + typedef ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::Path_Measurement_Servant, + ::CUTS::CCM_Path_Measurement, + ::Components::CCMContext, + Benchmark_Data_Collector_Ex_Servant + > + MACRO_MADNESS_TYPEDEF; + + ACE_CString obj_id (this->ins_name_); + obj_id += "_online_measurements"; + + ACE_NEW_THROW_EX (tmp, + MACRO_MADNESS_TYPEDEF ( + obj_id.c_str (), + "online_measurements", + ::CIAO::Port_Activator::Facet, + 0, + this->context_, + this), + ::CORBA::NO_MEMORY ()); + + ::CIAO::Servant_Activator *sa = + this->container_->ports_servant_activator (); + + if (!sa->register_port_activator (tmp)) + { + return ::CUTS::Path_Measurement::_nil (); + } + + ::CORBA::Object_var obj = + this->container_->generate_reference ( + obj_id.c_str (), + "IDL:CUTS/Path_Measurement:1.0", + ::CIAO::Container::Facet_Consumer + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Path_Measurement::_nil ()); + + this->add_facet ("online_measurements", + obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Path_Measurement::_nil ()); + + return obj._retn (); + } + + ::CUTS::BDC_Control_Handle_ptr + Benchmark_Data_Collector_Ex_Servant::provide_controls ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + if (! ::CORBA::is_nil (this->provide_controls_.in ())) + { + return ::CUTS::BDC_Control_Handle::_duplicate (this->provide_controls_.in ()); + } + + ::CORBA::Object_var obj = + this->provide_controls_i (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::BDC_Control_Handle::_nil ()); + + ::CUTS::BDC_Control_Handle_var fo = + ::CUTS::BDC_Control_Handle::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::BDC_Control_Handle::_nil ()); + + this->provide_controls_ = fo; + return ::CUTS::BDC_Control_Handle::_duplicate (this->provide_controls_.in ()); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Ex_Servant::provide_controls_i ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::CORBA::Object_ptr ret = + this->lookup_facet ("controls"); + + if (! ::CORBA::is_nil (ret)) + { + return ret; + } + + ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::BDC_Control_Handle_Servant, + ::CUTS::CCM_BDC_Control_Handle, + ::Components::CCMContext, + Benchmark_Data_Collector_Ex_Servant + > *tmp = 0; + + typedef ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::BDC_Control_Handle_Servant, + ::CUTS::CCM_BDC_Control_Handle, + ::Components::CCMContext, + Benchmark_Data_Collector_Ex_Servant + > + MACRO_MADNESS_TYPEDEF; + + ACE_CString obj_id (this->ins_name_); + obj_id += "_controls"; + + ACE_NEW_THROW_EX (tmp, + MACRO_MADNESS_TYPEDEF ( + obj_id.c_str (), + "controls", + ::CIAO::Port_Activator::Facet, + 0, + this->context_, + this), + ::CORBA::NO_MEMORY ()); + + ::CIAO::Servant_Activator *sa = + this->container_->ports_servant_activator (); + + if (!sa->register_port_activator (tmp)) + { + return ::CUTS::BDC_Control_Handle::_nil (); + } + + ::CORBA::Object_var obj = + this->container_->generate_reference ( + obj_id.c_str (), + "IDL:CUTS/BDC_Control_Handle:1.0", + ::CIAO::Container::Facet_Consumer + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::BDC_Control_Handle::_nil ()); + + this->add_facet ("controls", + obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::BDC_Control_Handle::_nil ()); + + return obj._retn (); + } + + ::CUTS::Database_Service_ptr + Benchmark_Data_Collector_Ex_Servant::provide_database_service ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + if (! ::CORBA::is_nil (this->provide_database_service_.in ())) + { + return ::CUTS::Database_Service::_duplicate (this->provide_database_service_.in ()); + } + + ::CORBA::Object_var obj = + this->provide_database_service_i (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Database_Service::_nil ()); + + ::CUTS::Database_Service_var fo = + ::CUTS::Database_Service::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Database_Service::_nil ()); + + this->provide_database_service_ = fo; + return ::CUTS::Database_Service::_duplicate (this->provide_database_service_.in ()); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Ex_Servant::provide_database_service_i ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::CORBA::Object_ptr ret = + this->lookup_facet ("database_service"); + + if (! ::CORBA::is_nil (ret)) + { + return ret; + } + + ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::Database_Service_Servant, + ::CUTS::CCM_Database_Service, + ::Components::CCMContext, + Benchmark_Data_Collector_Ex_Servant + > *tmp = 0; + + typedef ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::Database_Service_Servant, + ::CUTS::CCM_Database_Service, + ::Components::CCMContext, + Benchmark_Data_Collector_Ex_Servant + > + MACRO_MADNESS_TYPEDEF; + + ACE_CString obj_id (this->ins_name_); + obj_id += "_database_service"; + + ACE_NEW_THROW_EX (tmp, + MACRO_MADNESS_TYPEDEF ( + obj_id.c_str (), + "database_service", + ::CIAO::Port_Activator::Facet, + 0, + this->context_, + this), + ::CORBA::NO_MEMORY ()); + + ::CIAO::Servant_Activator *sa = + this->container_->ports_servant_activator (); + + if (!sa->register_port_activator (tmp)) + { + return ::CUTS::Database_Service::_nil (); + } + + ::CORBA::Object_var obj = + this->container_->generate_reference ( + obj_id.c_str (), + "IDL:CUTS/Database_Service:1.0", + ::CIAO::Container::Facet_Consumer + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Database_Service::_nil ()); + + this->add_facet ("database_service", + obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Database_Service::_nil ()); + + return obj._retn (); + } + + ::Components::Cookie * + Benchmark_Data_Collector_Ex_Servant::subscribe_collection_done ( + ::CUTS::Collection_StatisticsConsumer_ptr c + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)) + { + return this->context_->subscribe_collection_done ( + c + ACE_ENV_ARG_PARAMETER); + } + + ::Components::Cookie * + Benchmark_Data_Collector_Ex_Servant::subscribe_collection_done_generic ( + ::Components::EventConsumerBase_ptr c + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)) + { + return this->context_->subscribe_collection_done_generic ( + c + ACE_ENV_ARG_PARAMETER); + } + + ::CUTS::Collection_StatisticsConsumer_ptr + Benchmark_Data_Collector_Ex_Servant::unsubscribe_collection_done ( + ::Components::Cookie *ck + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidConnection)) + { + return this->context_->unsubscribe_collection_done ( + ck + ACE_ENV_ARG_PARAMETER); + } + + ::Components::Cookie * + Benchmark_Data_Collector_Ex_Servant::connect ( + const char *name, + ::CORBA::Object_ptr connection + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::AlreadyConnected, + ::Components::ExceededConnectionLimit)) + { + // If the component has no receptacles, this will be unused. + ACE_UNUSED_ARG (connection); + + if (name == 0) + { + ACE_THROW_RETURN ( ::Components::InvalidName (), 0); + } + + ACE_THROW_RETURN ( ::Components::InvalidName (), 0); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Ex_Servant::disconnect ( + const char *name, + ::Components::Cookie * ck + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::CookieRequired, + ::Components::NoConnection)) + { + ACE_UNUSED_ARG (ck); + + if (name == 0) + { + ACE_THROW_RETURN ( ::CORBA::BAD_PARAM (), + ::CORBA::Object::_nil ()); + } + + ACE_THROW_RETURN ( ::Components::InvalidName (), + ::CORBA::Object::_nil ()); + } + + ::Components::ReceptacleDescriptions * + Benchmark_Data_Collector_Ex_Servant::get_all_receptacles ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::ReceptacleDescriptions *retval = 0; + ACE_NEW_RETURN (retval, + ::Components::ReceptacleDescriptions, + 0); + ::Components::ReceptacleDescriptions_var safe_retval = retval; + safe_retval->length (0UL); + + return safe_retval._retn (); + } + + void + Benchmark_Data_Collector_Ex_Servant::connect_consumer ( + const char * emitter_name, + ::Components::EventConsumerBase_ptr consumer + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::AlreadyConnected, + ::Components::InvalidConnection)) + { + if (emitter_name == 0) + { + ACE_THROW ( ::CORBA::BAD_PARAM ()); + } + + ACE_UNUSED_ARG (consumer); + ACE_THROW ( ::Components::InvalidName ()); + } + + ::Components::EventConsumerBase_ptr + Benchmark_Data_Collector_Ex_Servant::disconnect_consumer ( + const char *source_name + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::NoConnection)) + { + if (source_name == 0) + { + ACE_THROW_RETURN ( ::CORBA::BAD_PARAM (), + ::Components::EventConsumerBase::_nil ()); + } + + ACE_THROW_RETURN ( ::Components::InvalidName (), + ::Components::EventConsumerBase::_nil ()); + } + + ::Components::PublisherDescriptions * + Benchmark_Data_Collector_Ex_Servant::get_all_publishers ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::PublisherDescriptions *retval = 0; + ACE_NEW_RETURN (retval, + ::Components::PublisherDescriptions, + 0); + ::Components::PublisherDescriptions_var safe_retval = retval; + safe_retval->length (1UL); + + ::CIAO::Servant_Impl_Base::describe_pub_event_source< + ::CUTS::Collection_StatisticsConsumer_var + > ("collection_done", + "IDL:CUTS/Collection_Statistics:1.0", + this->context_->ciao_publishes_collection_done_map_, + safe_retval, + 0UL); + + return safe_retval._retn (); + } + + ::Components::EmitterDescriptions * + Benchmark_Data_Collector_Ex_Servant::get_all_emitters ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::EmitterDescriptions *retval = 0; + ACE_NEW_RETURN (retval, + ::Components::EmitterDescriptions, + 0); + ::Components::EmitterDescriptions_var safe_retval = retval; + safe_retval->length (0UL); + + return safe_retval._retn (); + } + + ::Components::Cookie * + Benchmark_Data_Collector_Ex_Servant::subscribe ( + const char *publisher_name, + ::Components::EventConsumerBase_ptr subscribe + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::ExceededConnectionLimit)) + { + // Just in case there are no if blocks + ACE_UNUSED_ARG (subscribe); + + if (publisher_name == 0) + { + ACE_THROW_RETURN ( ::Components::InvalidName (), 0); + } + + if (ACE_OS::strcmp (publisher_name, "collection_done") == 0) + { + ::CUTS::Collection_StatisticsConsumer_var sub = + ::CUTS::Collection_StatisticsConsumer::_narrow ( + subscribe + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + if ( ::CORBA::is_nil (sub.in ())) + { + ::CORBA::Boolean substitutable = + subscribe->ciao_is_substitutable ( + ::CUTS::Collection_Statistics::_tao_obv_static_repository_id () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + if (substitutable) + { + return this->subscribe_collection_done_generic ( + subscribe + ACE_ENV_ARG_PARAMETER); + } + + else + { + ACE_THROW_RETURN ( ::Components::InvalidConnection (), 0); + } + } + + else + { + return this->subscribe_collection_done ( + sub.in () + ACE_ENV_ARG_PARAMETER); + } + } + + ACE_THROW_RETURN ( ::Components::InvalidName (), 0); + } + + ::Components::EventConsumerBase_ptr + Benchmark_Data_Collector_Ex_Servant::unsubscribe ( + const char *publisher_name, + ::Components::Cookie *ck + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection)) + { + // Just in case there are no if blocks + ACE_UNUSED_ARG (ck); + + if (publisher_name == 0) + { + ACE_THROW_RETURN ( ::Components::InvalidName (), + ::Components::EventConsumerBase::_nil ()); + } + + if (ACE_OS::strcmp (publisher_name, "collection_done") == 0) + { + return this->unsubscribe_collection_done ( + ck + ACE_ENV_ARG_PARAMETER); + } + + ACE_THROW_RETURN ( ::Components::InvalidName (), + ::Components::EventConsumerBase::_nil ()); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Ex_Servant::get_facet_executor ( + const char *name + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + if (name == 0) + { + ACE_THROW_RETURN ( ::CORBA::BAD_PARAM (), + ::CORBA::Object::_nil ()); + } + + if (ACE_OS::strcmp (name, "testing_service") == 0) + { + return this->executor_->get_testing_service (ACE_ENV_SINGLE_ARG_PARAMETER); + } + + if (ACE_OS::strcmp (name, "online_measurements") == 0) + { + return this->executor_->get_online_measurements (ACE_ENV_SINGLE_ARG_PARAMETER); + } + + if (ACE_OS::strcmp (name, "controls") == 0) + { + return this->executor_->get_controls (ACE_ENV_SINGLE_ARG_PARAMETER); + } + + if (ACE_OS::strcmp (name, "database_service") == 0) + { + return this->executor_->get_database_service (ACE_ENV_SINGLE_ARG_PARAMETER); + } + + return ::CORBA::Object::_nil (); + } + + // Supported operations. + + // Component attribute operations. + + ::CORBA::Long + Benchmark_Data_Collector_Ex_Servant::timeout ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return this->executor_->timeout ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + void + Benchmark_Data_Collector_Ex_Servant::timeout ( + ::CORBA::Long timeout + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + this->executor_->timeout ( + timeout + ACE_ENV_ARG_PARAMETER); + } + + ::CORBA::Long + Benchmark_Data_Collector_Ex_Servant::collection_threads ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return this->executor_->collection_threads ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + void + Benchmark_Data_Collector_Ex_Servant::collection_threads ( + ::CORBA::Long collection_threads + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + this->executor_->collection_threads ( + collection_threads + ACE_ENV_ARG_PARAMETER); + } + + char * + Benchmark_Data_Collector_Ex_Servant::metrics_outfile ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return this->executor_->metrics_outfile ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + void + Benchmark_Data_Collector_Ex_Servant::metrics_outfile ( + const char * metrics_outfile + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + this->executor_->metrics_outfile ( + metrics_outfile + ACE_ENV_ARG_PARAMETER); + } + + char * + Benchmark_Data_Collector_Ex_Servant::server_name ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return this->executor_->server_name ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + void + Benchmark_Data_Collector_Ex_Servant::server_name ( + const char * server_name + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + this->executor_->server_name ( + server_name + ACE_ENV_ARG_PARAMETER); + } + + // Private method to populate the port tables. + void + Benchmark_Data_Collector_Ex_Servant::populate_port_tables ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ACE_ENV_ARG_NOT_USED; + ::CORBA::Object_var obj_var; + ::Components::EventConsumerBase_var ecb_var; + + obj_var = + this->provide_testing_service_i ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + obj_var = + this->provide_online_measurements_i ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + obj_var = + this->provide_controls_i ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + obj_var = + this->provide_database_service_i ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + Benchmark_Data_Collector_Ex_Home_Servant::Benchmark_Data_Collector_Ex_Home_Servant ( + ::CUTS::CCM_Benchmark_Data_Collector_Ex_Home_ptr exe, + const char *ins_name, + ::CIAO::Session_Container *c, + ::CIAO::REC_POL_MAP &rec_pol_map) + : ::CIAO::Home_Servant_Impl_Base (c), + ::CIAO::Home_Servant_Impl< + ::POA_CUTS::Benchmark_Data_Collector_Ex_Home, + ::CUTS::CCM_Benchmark_Data_Collector_Ex_Home, + Benchmark_Data_Collector_Ex_Servant + > (exe, c, ins_name, rec_pol_map) + { + } + + Benchmark_Data_Collector_Ex_Home_Servant::~Benchmark_Data_Collector_Ex_Home_Servant (void) + { + } + + // Home operations. + + // Home supported interface operations. + + // Home factory and finder operations. + + // Home attribute operations. + + extern "C" BENCHMARK_DATA_COLLECTOR_EX_SVNT_Export ::PortableServer::Servant + create_CUTS_Benchmark_Data_Collector_Ex_Home_Servant ( + ::Components::HomeExecutorBase_ptr p, + ::CIAO::Session_Container *c, + const char *ins_name, + ::CIAO::REC_POL_MAP &rec_pol_map + ACE_ENV_ARG_DECL) + { + if (p == 0) + { + return 0; + } + + ::CUTS::CCM_Benchmark_Data_Collector_Ex_Home_var x = + ::CUTS::CCM_Benchmark_Data_Collector_Ex_Home::_narrow ( + p + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + if (::CORBA::is_nil (x.in ())) + { + return 0; + } + + return new + Benchmark_Data_Collector_Ex_Home_Servant ( + x.in (), + ins_name, + c, rec_pol_map); + } + } +} + diff --git a/CIAO/examples/RT1H/Benchmark_Data_Collector_Ex_svnt.h b/CIAO/examples/RT1H/Benchmark_Data_Collector_Ex_svnt.h new file mode 100644 index 00000000000..55c6a9bb410 --- /dev/null +++ b/CIAO/examples/RT1H/Benchmark_Data_Collector_Ex_svnt.h @@ -0,0 +1,577 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_GLUE_SESSION_BENCHMARK_DATA_COLLECTOR_EX_SVNT_H +#define CIAO_GLUE_SESSION_BENCHMARK_DATA_COLLECTOR_EX_SVNT_H + +#include /**/ "ace/pre.h" + +#include "Benchmark_Data_Collector_ExEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ciao/Container_Base.h" +#include "ciao/Context_Impl_T.h" +#include "ciao/Servant_Impl_T.h" +#include "ciao/Home_Servant_Impl_T.h" + +#include "Benchmark_Data_Collector_ExS.h" + +namespace CIAO_FACET_CUTS +{ + template <typename T> + class Testing_Service_Servant_T + : public virtual POA_CUTS::Testing_Service + { + public: + Testing_Service_Servant_T ( + ::CUTS::CCM_Testing_Service_ptr executor, + ::Components::CCMContext_ptr ctx); + + virtual ~Testing_Service_Servant_T (void); + + virtual ::CORBA::Long + register_component ( + const ::CUTS::Component_Registration & cr + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::Registration_Failed, + ::CUTS::Registration_Limit)); + + virtual void + unregister_component ( + const ::CUTS::Component_Registration & cr + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found)); + + // Get component implementation. + virtual CORBA::Object_ptr + _get_component ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + protected: + // Facet executor. + ::CUTS::CCM_Testing_Service_var executor_; + + // Context object. + ::Components::CCMContext_var ctx_; + }; + + typedef Testing_Service_Servant_T<int> Testing_Service_Servant; +} + +namespace CIAO_FACET_CUTS +{ + template <typename T> + class Path_Measurement_Servant_T + : public virtual POA_CUTS::Path_Measurement + { + public: + Path_Measurement_Servant_T ( + ::CUTS::CCM_Path_Measurement_ptr executor, + ::Components::CCMContext_ptr ctx); + + virtual ~Path_Measurement_Servant_T (void); + + virtual ::CORBA::Long + bind_to_path ( + const ::CUTS::Path_Sequence & path, + ::CORBA::UShort flags + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::Binding_Failed)); + + virtual void + unbind_to_path ( + ::CORBA::Long path_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found)); + + virtual ::CUTS::Event_Time_Info + execution_time ( + ::CORBA::Long path_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found, + ::CUTS::Operation_Failed)); + + // Get component implementation. + virtual CORBA::Object_ptr + _get_component ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + protected: + // Facet executor. + ::CUTS::CCM_Path_Measurement_var executor_; + + // Context object. + ::Components::CCMContext_var ctx_; + }; + + typedef Path_Measurement_Servant_T<int> Path_Measurement_Servant; +} + +namespace CIAO_FACET_CUTS +{ + template <typename T> + class BDC_Control_Handle_Servant_T + : public virtual POA_CUTS::BDC_Control_Handle + { + public: + BDC_Control_Handle_Servant_T ( + ::CUTS::CCM_BDC_Control_Handle_ptr executor, + ::Components::CCMContext_ptr ctx); + + virtual ~BDC_Control_Handle_Servant_T (void); + + virtual void + collect_performance_data ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // Get component implementation. + virtual CORBA::Object_ptr + _get_component ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + protected: + // Facet executor. + ::CUTS::CCM_BDC_Control_Handle_var executor_; + + // Context object. + ::Components::CCMContext_var ctx_; + }; + + typedef BDC_Control_Handle_Servant_T<int> BDC_Control_Handle_Servant; +} + +namespace CIAO_FACET_CUTS +{ + template <typename T> + class Database_Service_Servant_T + : public virtual POA_CUTS::Database_Service + { + public: + Database_Service_Servant_T ( + ::CUTS::CCM_Database_Service_ptr executor, + ::Components::CCMContext_ptr ctx); + + virtual ~Database_Service_Servant_T (void); + + virtual ::CORBA::Long + create_new_test ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual void + stop_current_test ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::CORBA::Long + current_test ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // Get component implementation. + virtual CORBA::Object_ptr + _get_component ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + protected: + // Facet executor. + ::CUTS::CCM_Database_Service_var executor_; + + // Context object. + ::Components::CCMContext_var ctx_; + }; + + typedef Database_Service_Servant_T<int> Database_Service_Servant; +} + +namespace CUTS +{ + namespace CIDL_Benchmark_Data_Collector_Ex_Impl + { + class Benchmark_Data_Collector_Ex_Servant; + + class BENCHMARK_DATA_COLLECTOR_EX_SVNT_Export Benchmark_Data_Collector_Ex_Context + : public virtual CIAO::Context_Impl< + ::CUTS::CCM_Benchmark_Data_Collector_Ex_Context, + Benchmark_Data_Collector_Ex_Servant, + ::CUTS::Benchmark_Data_Collector_Ex, + ::CUTS::Benchmark_Data_Collector_Ex_var + > + { + public: + // We will allow the servant glue code we generate to access our state. + friend class Benchmark_Data_Collector_Ex_Servant; + + Benchmark_Data_Collector_Ex_Context ( + ::Components::CCMHome_ptr h, + ::CIAO::Session_Container *c, + Benchmark_Data_Collector_Ex_Servant *sv); + + virtual ~Benchmark_Data_Collector_Ex_Context (void); + + // Operations for Benchmark_Data_Collector_Ex receptacles and event sources, + // defined in ::CUTS::CCM_Benchmark_Data_Collector_Ex_Context. + + virtual void + push_collection_done ( + ::CUTS::Collection_Statistics *ev + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // CIAO-specific. + + static Benchmark_Data_Collector_Ex_Context * + _narrow ( + ::Components::SessionContext_ptr p + ACE_ENV_ARG_DECL_WITH_DEFAULTS); + + protected: + // Methods that manage this component's connections and consumers. + + virtual ::Components::Cookie * + subscribe_collection_done ( + ::CUTS::Collection_StatisticsConsumer_ptr c + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)); + + // CIAO-specific. + ::Components::Cookie * + subscribe_collection_done_generic ( + ::Components::EventConsumerBase_ptr c + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)); + + virtual ::CUTS::Collection_StatisticsConsumer_ptr + unsubscribe_collection_done ( + ::Components::Cookie *ck + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidConnection)); + + protected: + ACE_Active_Map_Manager< + ::CUTS::Collection_StatisticsConsumer_var> + ciao_publishes_collection_done_map_; + + ACE_Active_Map_Manager< + ::Components::EventConsumerBase_var> + ciao_publishes_collection_done_generic_map_; + }; + + class BENCHMARK_DATA_COLLECTOR_EX_SVNT_Export Benchmark_Data_Collector_Ex_Servant + : public virtual CIAO::Servant_Impl< + POA_CUTS::Benchmark_Data_Collector_Ex, + ::CUTS::CCM_Benchmark_Data_Collector_Ex, + Benchmark_Data_Collector_Ex_Context + > + { + public: + + typedef ::CUTS::CCM_Benchmark_Data_Collector_Ex _exec_type; + + Benchmark_Data_Collector_Ex_Servant ( + ::CUTS::CCM_Benchmark_Data_Collector_Ex_ptr executor, + ::Components::CCMHome_ptr h, + const char *ins_name, + ::CIAO::Home_Servant_Impl_Base *hs, + ::CIAO::Session_Container *c, + ::CIAO::REC_POL_MAP &rec_pol_map); + + virtual ~Benchmark_Data_Collector_Ex_Servant (void); + + virtual void + set_attributes ( + const ::Components::ConfigValues &descr + ACE_ENV_ARG_DECL); + + // Supported operations. + + // Public port operations. + + virtual ::CUTS::Testing_Service_ptr + provide_testing_service ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::CUTS::Path_Measurement_ptr + provide_online_measurements ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::CUTS::BDC_Control_Handle_ptr + provide_controls ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::Components::Cookie * + subscribe_collection_done ( + ::CUTS::Collection_StatisticsConsumer_ptr c + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)); + + // CIAO-specific. + ::Components::Cookie * + subscribe_collection_done_generic ( + ::Components::EventConsumerBase_ptr c + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)); + + virtual ::CUTS::Collection_StatisticsConsumer_ptr + unsubscribe_collection_done ( + ::Components::Cookie *ck + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidConnection)); + + virtual ::CUTS::Database_Service_ptr + provide_database_service ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // Component attribute operations. + + virtual ::CORBA::Long + timeout ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + void + timeout ( + ::CORBA::Long timeout + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::CORBA::Long + collection_threads ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + void + collection_threads ( + ::CORBA::Long collection_threads + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual char * + metrics_outfile ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + void + metrics_outfile ( + const char * metrics_outfile + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual char * + server_name ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + void + server_name ( + const char * server_name + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // Operations for Receptacles interface. + + virtual ::Components::Cookie * + connect ( + const char *name, + CORBA::Object_ptr connection + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::AlreadyConnected, + ::Components::ExceededConnectionLimit)); + + virtual CORBA::Object_ptr + disconnect ( + const char *name, + ::Components::Cookie *ck + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::CookieRequired, + ::Components::NoConnection)); + + virtual ::Components::ReceptacleDescriptions * + get_all_receptacles ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // Operations for Events interface. + + virtual ::Components::Cookie * + subscribe ( + const char *publisher_name, + ::Components::EventConsumerBase_ptr subscriber + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::ExceededConnectionLimit)); + + virtual ::Components::EventConsumerBase_ptr + unsubscribe ( + const char *publisher_name, + ::Components::Cookie *ck + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection)); + + virtual void + connect_consumer ( + const char *emitter_name, + ::Components::EventConsumerBase_ptr consumer + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::AlreadyConnected, + ::Components::InvalidConnection)); + + virtual ::Components::EventConsumerBase_ptr + disconnect_consumer ( + const char *source_name + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::NoConnection)); + + virtual ::Components::PublisherDescriptions * + get_all_publishers ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::Components::EmitterDescriptions * + get_all_emitters ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // CIAO specific operations on the servant. + CORBA::Object_ptr + get_facet_executor ( + const char *name + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + private: + + ::CUTS::Testing_Service_var + provide_testing_service_; + + ::CUTS::Path_Measurement_var + provide_online_measurements_; + + ::CUTS::BDC_Control_Handle_var + provide_controls_; + + ::CUTS::Database_Service_var + provide_database_service_; + + const char *ins_name_; + + private: + + void + populate_port_tables ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + ::CORBA::Object_ptr + provide_testing_service_i ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + ::CORBA::Object_ptr + provide_online_measurements_i ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + ::CORBA::Object_ptr + provide_controls_i ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + ::CORBA::Object_ptr + provide_database_service_i ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + }; + + class BENCHMARK_DATA_COLLECTOR_EX_SVNT_Export Benchmark_Data_Collector_Ex_Home_Servant + : public virtual + ::CIAO::Home_Servant_Impl< + ::POA_CUTS::Benchmark_Data_Collector_Ex_Home, + ::CUTS::CCM_Benchmark_Data_Collector_Ex_Home, + Benchmark_Data_Collector_Ex_Servant + > + { + public: + + Benchmark_Data_Collector_Ex_Home_Servant ( + ::CUTS::CCM_Benchmark_Data_Collector_Ex_Home_ptr exe, + const char *ins_name, + ::CIAO::Session_Container *c, + ::CIAO::REC_POL_MAP &rec_pol_map); + + virtual ~Benchmark_Data_Collector_Ex_Home_Servant (void); + + // Home operations. + // Home factory and finder operations. + + // Attribute operations. + }; + + extern "C" BENCHMARK_DATA_COLLECTOR_EX_SVNT_Export ::PortableServer::Servant + create_CUTS_Benchmark_Data_Collector_Ex_Home_Servant ( + ::Components::HomeExecutorBase_ptr p, + CIAO::Session_Container *c, + const char *ins_name, + ::CIAO::REC_POL_MAP &rec_pol_map + ACE_ENV_ARG_DECL_WITH_DEFAULTS); + } +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_GLUE_SESSION_BENCHMARK_DATA_COLLECTOR_EX_SVNT_H */ + diff --git a/CIAO/examples/RT1H/Benchmark_Data_Collector_svnt.cpp b/CIAO/examples/RT1H/Benchmark_Data_Collector_svnt.cpp new file mode 100644 index 00000000000..24e85d79de0 --- /dev/null +++ b/CIAO/examples/RT1H/Benchmark_Data_Collector_svnt.cpp @@ -0,0 +1,1203 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "Benchmark_Data_Collector_svnt.h" +#include "Cookies.h" +#include "ciao/Servant_Activator.h" +#include "ciao/Port_Activator_T.h" +#include "ace/SString.h" + +namespace CIAO_FACET_CUTS +{ + template <typename T> + Testing_Service_Servant_T<T>::Testing_Service_Servant_T ( + ::CUTS::CCM_Testing_Service_ptr executor, + ::Components::CCMContext_ptr c) + : executor_ ( ::CUTS::CCM_Testing_Service::_duplicate (executor)), + ctx_ ( ::Components::CCMContext::_duplicate (c)) + { + } + + template <typename T> + Testing_Service_Servant_T<T>::~Testing_Service_Servant_T (void) + { + } + + template <typename T> + ::CORBA::Long + Testing_Service_Servant_T<T>::register_component ( + const ::CUTS::Component_Registration & cr + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::Registration_Failed, + ::CUTS::Registration_Limit)) + { + return this->executor_->register_component ( + cr + ACE_ENV_ARG_PARAMETER); + } + + template <typename T> + void + Testing_Service_Servant_T<T>::unregister_component ( + const ::CUTS::Component_Registration & cr + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found)) + { + this->executor_->unregister_component ( + cr + ACE_ENV_ARG_PARAMETER); + } + + template <typename T> + ::CORBA::Object_ptr + Testing_Service_Servant_T<T>::_get_component ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::SessionContext_var sc = + ::Components::SessionContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (sc.in ())) + { + return sc->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ::Components::EntityContext_var ec = + ::Components::EntityContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (ec.in ())) + { + return ec->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ACE_THROW_RETURN ( ::CORBA::INTERNAL (), 0); + } +} + +namespace CIAO_FACET_CUTS +{ + template <typename T> + Path_Measurement_Servant_T<T>::Path_Measurement_Servant_T ( + ::CUTS::CCM_Path_Measurement_ptr executor, + ::Components::CCMContext_ptr c) + : executor_ ( ::CUTS::CCM_Path_Measurement::_duplicate (executor)), + ctx_ ( ::Components::CCMContext::_duplicate (c)) + { + } + + template <typename T> + Path_Measurement_Servant_T<T>::~Path_Measurement_Servant_T (void) + { + } + + template <typename T> + ::CORBA::Long + Path_Measurement_Servant_T<T>::bind_to_path ( + const ::CUTS::Path_Sequence & path, + ::CORBA::UShort flags + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::Binding_Failed)) + { + return this->executor_->bind_to_path ( + path, + flags + ACE_ENV_ARG_PARAMETER); + } + + template <typename T> + void + Path_Measurement_Servant_T<T>::unbind_to_path ( + ::CORBA::Long path_id + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found)) + { + this->executor_->unbind_to_path ( + path_id + ACE_ENV_ARG_PARAMETER); + } + + template <typename T> + ::CUTS::Event_Time_Info + Path_Measurement_Servant_T<T>::execution_time ( + ::CORBA::Long path_id + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found, + ::CUTS::Operation_Failed)) + { + return this->executor_->execution_time ( + path_id + ACE_ENV_ARG_PARAMETER); + } + + template <typename T> + ::CORBA::Object_ptr + Path_Measurement_Servant_T<T>::_get_component ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::SessionContext_var sc = + ::Components::SessionContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (sc.in ())) + { + return sc->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ::Components::EntityContext_var ec = + ::Components::EntityContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (ec.in ())) + { + return ec->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ACE_THROW_RETURN ( ::CORBA::INTERNAL (), 0); + } +} + +namespace CIAO_FACET_CUTS +{ + template <typename T> + BDC_Control_Handle_Servant_T<T>::BDC_Control_Handle_Servant_T ( + ::CUTS::CCM_BDC_Control_Handle_ptr executor, + ::Components::CCMContext_ptr c) + : executor_ ( ::CUTS::CCM_BDC_Control_Handle::_duplicate (executor)), + ctx_ ( ::Components::CCMContext::_duplicate (c)) + { + } + + template <typename T> + BDC_Control_Handle_Servant_T<T>::~BDC_Control_Handle_Servant_T (void) + { + } + + template <typename T> + void + BDC_Control_Handle_Servant_T<T>::collect_performance_data ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + this->executor_->collect_performance_data ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + template <typename T> + ::CORBA::Object_ptr + BDC_Control_Handle_Servant_T<T>::_get_component ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::SessionContext_var sc = + ::Components::SessionContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (sc.in ())) + { + return sc->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ::Components::EntityContext_var ec = + ::Components::EntityContext::_narrow ( + this->ctx_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CORBA::Object::_nil ()); + + if (! ::CORBA::is_nil (ec.in ())) + { + return ec->get_CCM_object ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + ACE_THROW_RETURN ( ::CORBA::INTERNAL (), 0); + } +} + +namespace CUTS +{ + namespace CIDL_Benchmark_Data_Collector_Impl + { + Benchmark_Data_Collector_Context::Benchmark_Data_Collector_Context ( + ::Components::CCMHome_ptr h, + ::CIAO::Session_Container *c, + Benchmark_Data_Collector_Servant *sv) + : ::CIAO::Context_Impl_Base (h, c), + ::CIAO::Context_Impl< + ::CUTS::CCM_Benchmark_Data_Collector_Context, + Benchmark_Data_Collector_Servant, + ::CUTS::Benchmark_Data_Collector, + ::CUTS::Benchmark_Data_Collector_var + > (h, c, sv) + { + } + + Benchmark_Data_Collector_Context::~Benchmark_Data_Collector_Context (void) + { + } + + // Operations for Benchmark_Data_Collector receptacles and event sources, + // defined in ::CUTS::CCM_Benchmark_Data_Collector_Context. + + void + Benchmark_Data_Collector_Context::push_collection_done ( + ::CUTS::Collection_Statistics *ev + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + for (ACE_Active_Map_Manager< + ::CUTS::Collection_StatisticsConsumer_var>::iterator iter = + this->ciao_publishes_collection_done_map_.begin (); + iter != this->ciao_publishes_collection_done_map_.end (); + ++iter) + { + (*iter).int_id_->push_Collection_Statistics ( + ev + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + for (ACE_Active_Map_Manager< + ::Components::EventConsumerBase_var>::iterator giter = + this->ciao_publishes_collection_done_generic_map_.begin (); + giter != this->ciao_publishes_collection_done_generic_map_.end (); + ++giter) + { + (*giter).int_id_->push_event ( + ev + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + } + + ::Components::Cookie * + Benchmark_Data_Collector_Context::subscribe_collection_done ( + ::CUTS::Collection_StatisticsConsumer_ptr c + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)) + { + if ( ::CORBA::is_nil (c)) + { + ACE_THROW_RETURN ( ::CORBA::BAD_PARAM (), 0); + } + + ::CUTS::Collection_StatisticsConsumer_var sub = + ::CUTS::Collection_StatisticsConsumer::_duplicate (c); + + ACE_Active_Map_Manager_Key key; + this->ciao_publishes_collection_done_map_.bind (sub.in (), key); + sub._retn (); + + ::Components::Cookie * retv = 0; + ACE_NEW_THROW_EX (retv, + ::CIAO::Map_Key_Cookie (key), + ::CORBA::NO_MEMORY ()); + + return retv; + } + + ::Components::Cookie * + Benchmark_Data_Collector_Context::subscribe_collection_done_generic ( + ::Components::EventConsumerBase_ptr c + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)) + { + if ( ::CORBA::is_nil (c)) + { + ACE_THROW_RETURN ( ::CORBA::BAD_PARAM (), 0); + } + + ::Components::EventConsumerBase_var sub = + ::Components::EventConsumerBase::_duplicate (c); + + ACE_Active_Map_Manager_Key key; + this->ciao_publishes_collection_done_generic_map_.bind (sub.in (), key); + sub._retn (); + + ::Components::Cookie * retv = 0; + ACE_NEW_THROW_EX (retv, + ::CIAO::Map_Key_Cookie (key), + ::CORBA::NO_MEMORY ()); + + return retv; + } + + ::CUTS::Collection_StatisticsConsumer_ptr + Benchmark_Data_Collector_Context::unsubscribe_collection_done ( + ::Components::Cookie *ck + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidConnection)) + { + ACE_Active_Map_Manager_Key key; + + if (ck == 0 || ::CIAO::Map_Key_Cookie::extract (ck, key) == false) + { + ACE_THROW_RETURN ( ::Components::InvalidConnection (), + ::CUTS::Collection_StatisticsConsumer::_nil ()); + } + + ::CUTS::Collection_StatisticsConsumer_var retv; + if (this->ciao_publishes_collection_done_map_.unbind (key, retv) == 0) + { + return retv._retn (); + } + + ::Components::EventConsumerBase_var ecb; + + if (this->ciao_publishes_collection_done_generic_map_.unbind (key, ecb) != 0) + { + ACE_THROW_RETURN ( ::Components::InvalidConnection (), + ::CUTS::Collection_StatisticsConsumer::_nil ()); + } + + return ::CUTS::Collection_StatisticsConsumer::_nil (); + } + + // CIAO-specific. + + Benchmark_Data_Collector_Context * + Benchmark_Data_Collector_Context::_narrow ( + ::Components::SessionContext_ptr p + ACE_ENV_ARG_DECL_NOT_USED) + { + return dynamic_cast<Benchmark_Data_Collector_Context *> (p); + } + + Benchmark_Data_Collector_Servant::Benchmark_Data_Collector_Servant ( + ::CUTS::CCM_Benchmark_Data_Collector_ptr exe, + ::Components::CCMHome_ptr h, + const char *ins_name, + ::CIAO::Home_Servant_Impl_Base *hs, + ::CIAO::Session_Container *c, + ::CIAO::REC_POL_MAP &rec_pol_map) + : ::CIAO::Servant_Impl_Base (h, hs, c, rec_pol_map), + ::CIAO::Servant_Impl< + ::POA_CUTS::Benchmark_Data_Collector, + ::CUTS::CCM_Benchmark_Data_Collector, + Benchmark_Data_Collector_Context + > (exe, h, hs, c, rec_pol_map), + ins_name_ (ins_name) + { + ACE_NEW (this->context_, + Benchmark_Data_Collector_Context (h, c, this)); + + // Set the instance id of the component on the context + + this->context_->_ciao_instance_id (this->ins_name_); + + ACE_TRY_NEW_ENV + { + ::Components::SessionComponent_var scom = + ::Components::SessionComponent::_narrow ( + exe + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (! ::CORBA::is_nil (scom.in ())) + { + scom->set_session_context ( + this->context_ + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + + this->populate_port_tables ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } + + ACE_CATCHANY + { + } + + ACE_ENDTRY; + } + + Benchmark_Data_Collector_Servant::~Benchmark_Data_Collector_Servant (void) + { + } + + void + Benchmark_Data_Collector_Servant::set_attributes ( + const ::Components::ConfigValues &descr + ACE_ENV_ARG_DECL) + { + ACE_ENV_EMIT_CODE (ACE_UNUSED_ARG (ACE_TRY_ENV)); + + for ( ::CORBA::ULong i = 0; i < descr.length (); ++i) + { + const char *descr_name = descr[i]->name (); + ::CORBA::Any &descr_value = descr[i]->value (); + + if (ACE_OS::strcmp (descr_name, "timeout") == 0) + { + ::CORBA::Long _ciao_extract_val = 0; + descr_value >>= _ciao_extract_val; + this->timeout (_ciao_extract_val); + continue; + } + + if (ACE_OS::strcmp (descr_name, "collection_threads") == 0) + { + ::CORBA::Long _ciao_extract_val = 0; + descr_value >>= _ciao_extract_val; + this->collection_threads (_ciao_extract_val); + continue; + } + + if (ACE_OS::strcmp (descr_name, "metrics_outfile") == 0) + { + const char * _ciao_extract_val = 0; + descr_value >>= _ciao_extract_val; + this->metrics_outfile (_ciao_extract_val); + continue; + } + + ACE_UNUSED_ARG (descr_name); + ACE_UNUSED_ARG (descr_value); + } + } + + ::CUTS::Testing_Service_ptr + Benchmark_Data_Collector_Servant::provide_testing_service ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + if (! ::CORBA::is_nil (this->provide_testing_service_.in ())) + { + return ::CUTS::Testing_Service::_duplicate (this->provide_testing_service_.in ()); + } + + ::CORBA::Object_var obj = + this->provide_testing_service_i (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Testing_Service::_nil ()); + + ::CUTS::Testing_Service_var fo = + ::CUTS::Testing_Service::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Testing_Service::_nil ()); + + this->provide_testing_service_ = fo; + return ::CUTS::Testing_Service::_duplicate (this->provide_testing_service_.in ()); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Servant::provide_testing_service_i ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::CORBA::Object_ptr ret = + this->lookup_facet ("testing_service"); + + if (! ::CORBA::is_nil (ret)) + { + return ret; + } + + ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::Testing_Service_Servant, + ::CUTS::CCM_Testing_Service, + ::Components::CCMContext, + Benchmark_Data_Collector_Servant + > *tmp = 0; + + typedef ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::Testing_Service_Servant, + ::CUTS::CCM_Testing_Service, + ::Components::CCMContext, + Benchmark_Data_Collector_Servant + > + MACRO_MADNESS_TYPEDEF; + + ACE_CString obj_id (this->ins_name_); + obj_id += "_testing_service"; + + ACE_NEW_THROW_EX (tmp, + MACRO_MADNESS_TYPEDEF ( + obj_id.c_str (), + "testing_service", + ::CIAO::Port_Activator::Facet, + 0, + this->context_, + this), + ::CORBA::NO_MEMORY ()); + + ::CIAO::Servant_Activator *sa = + this->container_->ports_servant_activator (); + + if (!sa->register_port_activator (tmp)) + { + return ::CUTS::Testing_Service::_nil (); + } + + ::CORBA::Object_var obj = + this->container_->generate_reference ( + obj_id.c_str (), + "IDL:CUTS/Testing_Service:1.0", + ::CIAO::Container::Facet_Consumer + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Testing_Service::_nil ()); + + this->add_facet ("testing_service", + obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Testing_Service::_nil ()); + + return obj._retn (); + } + + ::CUTS::Path_Measurement_ptr + Benchmark_Data_Collector_Servant::provide_online_measurements ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + if (! ::CORBA::is_nil (this->provide_online_measurements_.in ())) + { + return ::CUTS::Path_Measurement::_duplicate (this->provide_online_measurements_.in ()); + } + + ::CORBA::Object_var obj = + this->provide_online_measurements_i (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Path_Measurement::_nil ()); + + ::CUTS::Path_Measurement_var fo = + ::CUTS::Path_Measurement::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Path_Measurement::_nil ()); + + this->provide_online_measurements_ = fo; + return ::CUTS::Path_Measurement::_duplicate (this->provide_online_measurements_.in ()); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Servant::provide_online_measurements_i ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::CORBA::Object_ptr ret = + this->lookup_facet ("online_measurements"); + + if (! ::CORBA::is_nil (ret)) + { + return ret; + } + + ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::Path_Measurement_Servant, + ::CUTS::CCM_Path_Measurement, + ::Components::CCMContext, + Benchmark_Data_Collector_Servant + > *tmp = 0; + + typedef ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::Path_Measurement_Servant, + ::CUTS::CCM_Path_Measurement, + ::Components::CCMContext, + Benchmark_Data_Collector_Servant + > + MACRO_MADNESS_TYPEDEF; + + ACE_CString obj_id (this->ins_name_); + obj_id += "_online_measurements"; + + ACE_NEW_THROW_EX (tmp, + MACRO_MADNESS_TYPEDEF ( + obj_id.c_str (), + "online_measurements", + ::CIAO::Port_Activator::Facet, + 0, + this->context_, + this), + ::CORBA::NO_MEMORY ()); + + ::CIAO::Servant_Activator *sa = + this->container_->ports_servant_activator (); + + if (!sa->register_port_activator (tmp)) + { + return ::CUTS::Path_Measurement::_nil (); + } + + ::CORBA::Object_var obj = + this->container_->generate_reference ( + obj_id.c_str (), + "IDL:CUTS/Path_Measurement:1.0", + ::CIAO::Container::Facet_Consumer + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Path_Measurement::_nil ()); + + this->add_facet ("online_measurements", + obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::Path_Measurement::_nil ()); + + return obj._retn (); + } + + ::CUTS::BDC_Control_Handle_ptr + Benchmark_Data_Collector_Servant::provide_controls ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + if (! ::CORBA::is_nil (this->provide_controls_.in ())) + { + return ::CUTS::BDC_Control_Handle::_duplicate (this->provide_controls_.in ()); + } + + ::CORBA::Object_var obj = + this->provide_controls_i (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::BDC_Control_Handle::_nil ()); + + ::CUTS::BDC_Control_Handle_var fo = + ::CUTS::BDC_Control_Handle::_narrow (obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::BDC_Control_Handle::_nil ()); + + this->provide_controls_ = fo; + return ::CUTS::BDC_Control_Handle::_duplicate (this->provide_controls_.in ()); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Servant::provide_controls_i ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::CORBA::Object_ptr ret = + this->lookup_facet ("controls"); + + if (! ::CORBA::is_nil (ret)) + { + return ret; + } + + ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::BDC_Control_Handle_Servant, + ::CUTS::CCM_BDC_Control_Handle, + ::Components::CCMContext, + Benchmark_Data_Collector_Servant + > *tmp = 0; + + typedef ::CIAO::Port_Activator_T< + ::CIAO_FACET_CUTS::BDC_Control_Handle_Servant, + ::CUTS::CCM_BDC_Control_Handle, + ::Components::CCMContext, + Benchmark_Data_Collector_Servant + > + MACRO_MADNESS_TYPEDEF; + + ACE_CString obj_id (this->ins_name_); + obj_id += "_controls"; + + ACE_NEW_THROW_EX (tmp, + MACRO_MADNESS_TYPEDEF ( + obj_id.c_str (), + "controls", + ::CIAO::Port_Activator::Facet, + 0, + this->context_, + this), + ::CORBA::NO_MEMORY ()); + + ::CIAO::Servant_Activator *sa = + this->container_->ports_servant_activator (); + + if (!sa->register_port_activator (tmp)) + { + return ::CUTS::BDC_Control_Handle::_nil (); + } + + ::CORBA::Object_var obj = + this->container_->generate_reference ( + obj_id.c_str (), + "IDL:CUTS/BDC_Control_Handle:1.0", + ::CIAO::Container::Facet_Consumer + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::BDC_Control_Handle::_nil ()); + + this->add_facet ("controls", + obj.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN ( ::CUTS::BDC_Control_Handle::_nil ()); + + return obj._retn (); + } + + ::Components::Cookie * + Benchmark_Data_Collector_Servant::subscribe_collection_done ( + ::CUTS::Collection_StatisticsConsumer_ptr c + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)) + { + return this->context_->subscribe_collection_done ( + c + ACE_ENV_ARG_PARAMETER); + } + + ::Components::Cookie * + Benchmark_Data_Collector_Servant::subscribe_collection_done_generic ( + ::Components::EventConsumerBase_ptr c + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)) + { + return this->context_->subscribe_collection_done_generic ( + c + ACE_ENV_ARG_PARAMETER); + } + + ::CUTS::Collection_StatisticsConsumer_ptr + Benchmark_Data_Collector_Servant::unsubscribe_collection_done ( + ::Components::Cookie *ck + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidConnection)) + { + return this->context_->unsubscribe_collection_done ( + ck + ACE_ENV_ARG_PARAMETER); + } + + ::Components::Cookie * + Benchmark_Data_Collector_Servant::connect ( + const char *name, + ::CORBA::Object_ptr connection + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::AlreadyConnected, + ::Components::ExceededConnectionLimit)) + { + // If the component has no receptacles, this will be unused. + ACE_UNUSED_ARG (connection); + + if (name == 0) + { + ACE_THROW_RETURN ( ::Components::InvalidName (), 0); + } + + ACE_THROW_RETURN ( ::Components::InvalidName (), 0); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Servant::disconnect ( + const char *name, + ::Components::Cookie * ck + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::CookieRequired, + ::Components::NoConnection)) + { + ACE_UNUSED_ARG (ck); + + if (name == 0) + { + ACE_THROW_RETURN ( ::CORBA::BAD_PARAM (), + ::CORBA::Object::_nil ()); + } + + ACE_THROW_RETURN ( ::Components::InvalidName (), + ::CORBA::Object::_nil ()); + } + + ::Components::ReceptacleDescriptions * + Benchmark_Data_Collector_Servant::get_all_receptacles ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::ReceptacleDescriptions *retval = 0; + ACE_NEW_RETURN (retval, + ::Components::ReceptacleDescriptions, + 0); + ::Components::ReceptacleDescriptions_var safe_retval = retval; + safe_retval->length (0UL); + + return safe_retval._retn (); + } + + void + Benchmark_Data_Collector_Servant::connect_consumer ( + const char * emitter_name, + ::Components::EventConsumerBase_ptr consumer + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::AlreadyConnected, + ::Components::InvalidConnection)) + { + if (emitter_name == 0) + { + ACE_THROW ( ::CORBA::BAD_PARAM ()); + } + + ACE_UNUSED_ARG (consumer); + ACE_THROW ( ::Components::InvalidName ()); + } + + ::Components::EventConsumerBase_ptr + Benchmark_Data_Collector_Servant::disconnect_consumer ( + const char *source_name + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::NoConnection)) + { + if (source_name == 0) + { + ACE_THROW_RETURN ( ::CORBA::BAD_PARAM (), + ::Components::EventConsumerBase::_nil ()); + } + + ACE_THROW_RETURN ( ::Components::InvalidName (), + ::Components::EventConsumerBase::_nil ()); + } + + ::Components::PublisherDescriptions * + Benchmark_Data_Collector_Servant::get_all_publishers ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::PublisherDescriptions *retval = 0; + ACE_NEW_RETURN (retval, + ::Components::PublisherDescriptions, + 0); + ::Components::PublisherDescriptions_var safe_retval = retval; + safe_retval->length (1UL); + + ::CIAO::Servant_Impl_Base::describe_pub_event_source< + ::CUTS::Collection_StatisticsConsumer_var + > ("collection_done", + "IDL:CUTS/Collection_Statistics:1.0", + this->context_->ciao_publishes_collection_done_map_, + safe_retval, + 0UL); + + return safe_retval._retn (); + } + + ::Components::EmitterDescriptions * + Benchmark_Data_Collector_Servant::get_all_emitters ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ::Components::EmitterDescriptions *retval = 0; + ACE_NEW_RETURN (retval, + ::Components::EmitterDescriptions, + 0); + ::Components::EmitterDescriptions_var safe_retval = retval; + safe_retval->length (0UL); + + return safe_retval._retn (); + } + + ::Components::Cookie * + Benchmark_Data_Collector_Servant::subscribe ( + const char *publisher_name, + ::Components::EventConsumerBase_ptr subscribe + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::ExceededConnectionLimit)) + { + // Just in case there are no if blocks + ACE_UNUSED_ARG (subscribe); + + if (publisher_name == 0) + { + ACE_THROW_RETURN ( ::Components::InvalidName (), 0); + } + + if (ACE_OS::strcmp (publisher_name, "collection_done") == 0) + { + ::CUTS::Collection_StatisticsConsumer_var sub = + ::CUTS::Collection_StatisticsConsumer::_narrow ( + subscribe + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + if ( ::CORBA::is_nil (sub.in ())) + { + ::CORBA::Boolean substitutable = + subscribe->ciao_is_substitutable ( + ::CUTS::Collection_Statistics::_tao_obv_static_repository_id () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + if (substitutable) + { + return this->subscribe_collection_done_generic ( + subscribe + ACE_ENV_ARG_PARAMETER); + } + + else + { + ACE_THROW_RETURN ( ::Components::InvalidConnection (), 0); + } + } + + else + { + return this->subscribe_collection_done ( + sub.in () + ACE_ENV_ARG_PARAMETER); + } + } + + ACE_THROW_RETURN ( ::Components::InvalidName (), 0); + } + + ::Components::EventConsumerBase_ptr + Benchmark_Data_Collector_Servant::unsubscribe ( + const char *publisher_name, + ::Components::Cookie *ck + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection)) + { + // Just in case there are no if blocks + ACE_UNUSED_ARG (ck); + + if (publisher_name == 0) + { + ACE_THROW_RETURN ( ::Components::InvalidName (), + ::Components::EventConsumerBase::_nil ()); + } + + if (ACE_OS::strcmp (publisher_name, "collection_done") == 0) + { + return this->unsubscribe_collection_done ( + ck + ACE_ENV_ARG_PARAMETER); + } + + ACE_THROW_RETURN ( ::Components::InvalidName (), + ::Components::EventConsumerBase::_nil ()); + } + + ::CORBA::Object_ptr + Benchmark_Data_Collector_Servant::get_facet_executor ( + const char *name + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + if (name == 0) + { + ACE_THROW_RETURN ( ::CORBA::BAD_PARAM (), + ::CORBA::Object::_nil ()); + } + + if (ACE_OS::strcmp (name, "testing_service") == 0) + { + return this->executor_->get_testing_service (ACE_ENV_SINGLE_ARG_PARAMETER); + } + + if (ACE_OS::strcmp (name, "online_measurements") == 0) + { + return this->executor_->get_online_measurements (ACE_ENV_SINGLE_ARG_PARAMETER); + } + + if (ACE_OS::strcmp (name, "controls") == 0) + { + return this->executor_->get_controls (ACE_ENV_SINGLE_ARG_PARAMETER); + } + + return ::CORBA::Object::_nil (); + } + + // Supported operations. + + // Component attribute operations. + + ::CORBA::Long + Benchmark_Data_Collector_Servant::timeout ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return this->executor_->timeout ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + void + Benchmark_Data_Collector_Servant::timeout ( + ::CORBA::Long timeout + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + this->executor_->timeout ( + timeout + ACE_ENV_ARG_PARAMETER); + } + + ::CORBA::Long + Benchmark_Data_Collector_Servant::collection_threads ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return this->executor_->collection_threads ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + void + Benchmark_Data_Collector_Servant::collection_threads ( + ::CORBA::Long collection_threads + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + this->executor_->collection_threads ( + collection_threads + ACE_ENV_ARG_PARAMETER); + } + + char * + Benchmark_Data_Collector_Servant::metrics_outfile ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return this->executor_->metrics_outfile ( + ACE_ENV_SINGLE_ARG_PARAMETER); + } + + void + Benchmark_Data_Collector_Servant::metrics_outfile ( + const char * metrics_outfile + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + this->executor_->metrics_outfile ( + metrics_outfile + ACE_ENV_ARG_PARAMETER); + } + + // Private method to populate the port tables. + void + Benchmark_Data_Collector_Servant::populate_port_tables ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ACE_ENV_ARG_NOT_USED; + ::CORBA::Object_var obj_var; + ::Components::EventConsumerBase_var ecb_var; + + obj_var = + this->provide_testing_service_i ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + obj_var = + this->provide_online_measurements_i ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + obj_var = + this->provide_controls_i ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + Benchmark_Data_Collector_Home_Servant::Benchmark_Data_Collector_Home_Servant ( + ::CUTS::CCM_Benchmark_Data_Collector_Home_ptr exe, + const char *ins_name, + ::CIAO::Session_Container *c, + ::CIAO::REC_POL_MAP &rec_pol_map) + : ::CIAO::Home_Servant_Impl_Base (c), + ::CIAO::Home_Servant_Impl< + ::POA_CUTS::Benchmark_Data_Collector_Home, + ::CUTS::CCM_Benchmark_Data_Collector_Home, + Benchmark_Data_Collector_Servant + > (exe, c, ins_name, rec_pol_map) + { + } + + Benchmark_Data_Collector_Home_Servant::~Benchmark_Data_Collector_Home_Servant (void) + { + } + + // Home operations. + + // Home supported interface operations. + + // Home factory and finder operations. + + // Home attribute operations. + + extern "C" BENCHMARK_DATA_COLLECTOR_SVNT_Export ::PortableServer::Servant + create_CUTS_Benchmark_Data_Collector_Home_Servant ( + ::Components::HomeExecutorBase_ptr p, + ::CIAO::Session_Container *c, + const char *ins_name, + ::CIAO::REC_POL_MAP &rec_pol_map + ACE_ENV_ARG_DECL) + { + if (p == 0) + { + return 0; + } + + ::CUTS::CCM_Benchmark_Data_Collector_Home_var x = + ::CUTS::CCM_Benchmark_Data_Collector_Home::_narrow ( + p + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + if (::CORBA::is_nil (x.in ())) + { + return 0; + } + + return new + Benchmark_Data_Collector_Home_Servant ( + x.in (), + ins_name, + c, rec_pol_map); + } + } +} + diff --git a/CIAO/examples/RT1H/Benchmark_Data_Collector_svnt.h b/CIAO/examples/RT1H/Benchmark_Data_Collector_svnt.h new file mode 100644 index 00000000000..cf32e8a0d3c --- /dev/null +++ b/CIAO/examples/RT1H/Benchmark_Data_Collector_svnt.h @@ -0,0 +1,508 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_GLUE_SESSION_BENCHMARK_DATA_COLLECTOR_SVNT_H +#define CIAO_GLUE_SESSION_BENCHMARK_DATA_COLLECTOR_SVNT_H + +#include /**/ "ace/pre.h" + +#include "Benchmark_Data_CollectorEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ciao/Container_Base.h" +#include "ciao/Context_Impl_T.h" +#include "ciao/Servant_Impl_T.h" +#include "ciao/Home_Servant_Impl_T.h" + +#include "Benchmark_Data_CollectorS.h" + +namespace CIAO_FACET_CUTS +{ + template <typename T> + class Testing_Service_Servant_T + : public virtual POA_CUTS::Testing_Service + { + public: + Testing_Service_Servant_T ( + ::CUTS::CCM_Testing_Service_ptr executor, + ::Components::CCMContext_ptr ctx); + + virtual ~Testing_Service_Servant_T (void); + + virtual ::CORBA::Long + register_component ( + const ::CUTS::Component_Registration & cr + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::Registration_Failed, + ::CUTS::Registration_Limit)); + + virtual void + unregister_component ( + const ::CUTS::Component_Registration & cr + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found)); + + // Get component implementation. + virtual CORBA::Object_ptr + _get_component ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + protected: + // Facet executor. + ::CUTS::CCM_Testing_Service_var executor_; + + // Context object. + ::Components::CCMContext_var ctx_; + }; + + typedef Testing_Service_Servant_T<int> Testing_Service_Servant; +} + +namespace CIAO_FACET_CUTS +{ + template <typename T> + class Path_Measurement_Servant_T + : public virtual POA_CUTS::Path_Measurement + { + public: + Path_Measurement_Servant_T ( + ::CUTS::CCM_Path_Measurement_ptr executor, + ::Components::CCMContext_ptr ctx); + + virtual ~Path_Measurement_Servant_T (void); + + virtual ::CORBA::Long + bind_to_path ( + const ::CUTS::Path_Sequence & path, + ::CORBA::UShort flags + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::Binding_Failed)); + + virtual void + unbind_to_path ( + ::CORBA::Long path_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found)); + + virtual ::CUTS::Event_Time_Info + execution_time ( + ::CORBA::Long path_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CUTS::ID_Not_Found, + ::CUTS::Operation_Failed)); + + // Get component implementation. + virtual CORBA::Object_ptr + _get_component ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + protected: + // Facet executor. + ::CUTS::CCM_Path_Measurement_var executor_; + + // Context object. + ::Components::CCMContext_var ctx_; + }; + + typedef Path_Measurement_Servant_T<int> Path_Measurement_Servant; +} + +namespace CIAO_FACET_CUTS +{ + template <typename T> + class BDC_Control_Handle_Servant_T + : public virtual POA_CUTS::BDC_Control_Handle + { + public: + BDC_Control_Handle_Servant_T ( + ::CUTS::CCM_BDC_Control_Handle_ptr executor, + ::Components::CCMContext_ptr ctx); + + virtual ~BDC_Control_Handle_Servant_T (void); + + virtual void + collect_performance_data ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // Get component implementation. + virtual CORBA::Object_ptr + _get_component ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + protected: + // Facet executor. + ::CUTS::CCM_BDC_Control_Handle_var executor_; + + // Context object. + ::Components::CCMContext_var ctx_; + }; + + typedef BDC_Control_Handle_Servant_T<int> BDC_Control_Handle_Servant; +} + +namespace CUTS +{ + namespace CIDL_Benchmark_Data_Collector_Impl + { + class Benchmark_Data_Collector_Servant; + + class BENCHMARK_DATA_COLLECTOR_SVNT_Export Benchmark_Data_Collector_Context + : public virtual CIAO::Context_Impl< + ::CUTS::CCM_Benchmark_Data_Collector_Context, + Benchmark_Data_Collector_Servant, + ::CUTS::Benchmark_Data_Collector, + ::CUTS::Benchmark_Data_Collector_var + > + { + public: + // We will allow the servant glue code we generate to access our state. + friend class Benchmark_Data_Collector_Servant; + + Benchmark_Data_Collector_Context ( + ::Components::CCMHome_ptr h, + ::CIAO::Session_Container *c, + Benchmark_Data_Collector_Servant *sv); + + virtual ~Benchmark_Data_Collector_Context (void); + + // Operations for Benchmark_Data_Collector receptacles and event sources, + // defined in ::CUTS::CCM_Benchmark_Data_Collector_Context. + + virtual void + push_collection_done ( + ::CUTS::Collection_Statistics *ev + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // CIAO-specific. + + static Benchmark_Data_Collector_Context * + _narrow ( + ::Components::SessionContext_ptr p + ACE_ENV_ARG_DECL_WITH_DEFAULTS); + + protected: + // Methods that manage this component's connections and consumers. + + virtual ::Components::Cookie * + subscribe_collection_done ( + ::CUTS::Collection_StatisticsConsumer_ptr c + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)); + + // CIAO-specific. + ::Components::Cookie * + subscribe_collection_done_generic ( + ::Components::EventConsumerBase_ptr c + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)); + + virtual ::CUTS::Collection_StatisticsConsumer_ptr + unsubscribe_collection_done ( + ::Components::Cookie *ck + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidConnection)); + + protected: + ACE_Active_Map_Manager< + ::CUTS::Collection_StatisticsConsumer_var> + ciao_publishes_collection_done_map_; + + ACE_Active_Map_Manager< + ::Components::EventConsumerBase_var> + ciao_publishes_collection_done_generic_map_; + }; + + class BENCHMARK_DATA_COLLECTOR_SVNT_Export Benchmark_Data_Collector_Servant + : public virtual CIAO::Servant_Impl< + POA_CUTS::Benchmark_Data_Collector, + ::CUTS::CCM_Benchmark_Data_Collector, + Benchmark_Data_Collector_Context + > + { + public: + + typedef ::CUTS::CCM_Benchmark_Data_Collector _exec_type; + + Benchmark_Data_Collector_Servant ( + ::CUTS::CCM_Benchmark_Data_Collector_ptr executor, + ::Components::CCMHome_ptr h, + const char *ins_name, + ::CIAO::Home_Servant_Impl_Base *hs, + ::CIAO::Session_Container *c, + ::CIAO::REC_POL_MAP &rec_pol_map); + + virtual ~Benchmark_Data_Collector_Servant (void); + + virtual void + set_attributes ( + const ::Components::ConfigValues &descr + ACE_ENV_ARG_DECL); + + // Supported operations. + + // Public port operations. + + virtual ::CUTS::Testing_Service_ptr + provide_testing_service ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::CUTS::Path_Measurement_ptr + provide_online_measurements ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::CUTS::BDC_Control_Handle_ptr + provide_controls ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::Components::Cookie * + subscribe_collection_done ( + ::CUTS::Collection_StatisticsConsumer_ptr c + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)); + + // CIAO-specific. + ::Components::Cookie * + subscribe_collection_done_generic ( + ::Components::EventConsumerBase_ptr c + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::ExceededConnectionLimit)); + + virtual ::CUTS::Collection_StatisticsConsumer_ptr + unsubscribe_collection_done ( + ::Components::Cookie *ck + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidConnection)); + + // Component attribute operations. + + virtual ::CORBA::Long + timeout ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + void + timeout ( + ::CORBA::Long timeout + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::CORBA::Long + collection_threads ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + void + collection_threads ( + ::CORBA::Long collection_threads + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual char * + metrics_outfile ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + void + metrics_outfile ( + const char * metrics_outfile + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // Operations for Receptacles interface. + + virtual ::Components::Cookie * + connect ( + const char *name, + CORBA::Object_ptr connection + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::AlreadyConnected, + ::Components::ExceededConnectionLimit)); + + virtual CORBA::Object_ptr + disconnect ( + const char *name, + ::Components::Cookie *ck + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::CookieRequired, + ::Components::NoConnection)); + + virtual ::Components::ReceptacleDescriptions * + get_all_receptacles ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // Operations for Events interface. + + virtual ::Components::Cookie * + subscribe ( + const char *publisher_name, + ::Components::EventConsumerBase_ptr subscriber + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection, + ::Components::ExceededConnectionLimit)); + + virtual ::Components::EventConsumerBase_ptr + unsubscribe ( + const char *publisher_name, + ::Components::Cookie *ck + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::InvalidConnection)); + + virtual void + connect_consumer ( + const char *emitter_name, + ::Components::EventConsumerBase_ptr consumer + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::AlreadyConnected, + ::Components::InvalidConnection)); + + virtual ::Components::EventConsumerBase_ptr + disconnect_consumer ( + const char *source_name + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::InvalidName, + ::Components::NoConnection)); + + virtual ::Components::PublisherDescriptions * + get_all_publishers ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual ::Components::EmitterDescriptions * + get_all_emitters ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // CIAO specific operations on the servant. + CORBA::Object_ptr + get_facet_executor ( + const char *name + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + private: + + ::CUTS::Testing_Service_var + provide_testing_service_; + + ::CUTS::Path_Measurement_var + provide_online_measurements_; + + ::CUTS::BDC_Control_Handle_var + provide_controls_; + + const char *ins_name_; + + private: + + void + populate_port_tables ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + ::CORBA::Object_ptr + provide_testing_service_i ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + ::CORBA::Object_ptr + provide_online_measurements_i ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + ::CORBA::Object_ptr + provide_controls_i ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + }; + + class BENCHMARK_DATA_COLLECTOR_SVNT_Export Benchmark_Data_Collector_Home_Servant + : public virtual + ::CIAO::Home_Servant_Impl< + ::POA_CUTS::Benchmark_Data_Collector_Home, + ::CUTS::CCM_Benchmark_Data_Collector_Home, + Benchmark_Data_Collector_Servant + > + { + public: + + Benchmark_Data_Collector_Home_Servant ( + ::CUTS::CCM_Benchmark_Data_Collector_Home_ptr exe, + const char *ins_name, + ::CIAO::Session_Container *c, + ::CIAO::REC_POL_MAP &rec_pol_map); + + virtual ~Benchmark_Data_Collector_Home_Servant (void); + + // Home operations. + // Home factory and finder operations. + + // Attribute operations. + }; + + extern "C" BENCHMARK_DATA_COLLECTOR_SVNT_Export ::PortableServer::Servant + create_CUTS_Benchmark_Data_Collector_Home_Servant ( + ::Components::HomeExecutorBase_ptr p, + CIAO::Session_Container *c, + const char *ins_name, + ::CIAO::REC_POL_MAP &rec_pol_map + ACE_ENV_ARG_DECL_WITH_DEFAULTS); + } +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_GLUE_SESSION_BENCHMARK_DATA_COLLECTOR_SVNT_H */ + |