diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-01-27 21:28:21 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-01-27 21:28:21 +0000 |
commit | 4a8af2d50cb65bc1d4c8451799b8cad59e1b52ce (patch) | |
tree | a657e024f04e908460fd5ba8cb9d4133a297e1a5 | |
parent | 9e00d3d99e89f17fa44449fa57dacb7326c5d12e (diff) | |
download | ATCD-4a8af2d50cb65bc1d4c8451799b8cad59e1b52ce.tar.gz |
*** empty log message ***
10 files changed, 197 insertions, 3 deletions
diff --git a/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_T.cpp b/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_T.cpp index 6d44811b457..fbdcfbe43ef 100644 --- a/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_T.cpp +++ b/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_T.cpp @@ -95,6 +95,8 @@ namespace CIAO this->home_servant_, this->container_); + ACE_DEBUG ((LM_DEBUG, "created the servant and activated\n")); + if (component_removed_ == 1) { // svt->ciao_preactivate (); diff --git a/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp b/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp index ec8fbc8afcf..4239ef56443 100644 --- a/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp +++ b/TAO/CIAO/DAnCE/ciao/NodeApplication_Impl.cpp @@ -22,6 +22,7 @@ CIAO::NodeApplication_Impl::finishLaunch ( { ACE_TRY { + ACE_DEBUG ((LM_DEBUG, "calling finish launch\n")); const CORBA::ULong length = providedReference.length (); // For every connection struct we finish the connection. @@ -208,6 +209,8 @@ CIAO::NodeApplication_Impl::install ( comp = kh->create_component (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "created the component\n")); + if (this->component_map_.bind (impl_infos[i].component_instance_name.in (), Components::CCMObject::_duplicate (comp.in ()))) ACE_TRY_THROW (Deployment::InstallationFailure ()); @@ -218,6 +221,8 @@ CIAO::NodeApplication_Impl::install ( (*retv)[i].component_ref = Components::CCMObject::_duplicate (comp.in ()); + ACE_DEBUG ((LM_DEBUG, "got the comp ref\n")); + // Deal with Component instance related Properties. // Now I am only concerning about the COMPOENTIOR and here is only // the hardcoded version of the configuration. Hopefully we will @@ -250,6 +255,8 @@ CIAO::NodeApplication_Impl::install ( } } + + ACE_DEBUG ((LM_DEBUG, "done with install\n")); } } ACE_CATCHANY diff --git a/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.cpp b/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.cpp index 6a5df27e17f..0a6391bfac9 100644 --- a/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.cpp +++ b/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.cpp @@ -113,9 +113,11 @@ namespace CIAO this->get_all_receptacles (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); + /* ::Components::ConsumerDescriptions_var consumer_desc = this->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); + */ ::Components::EmitterDescriptions_var emitter_desc = this->get_all_emitters (ACE_ENV_SINGLE_ARG_PARAMETER); @@ -127,7 +129,7 @@ namespace CIAO retv->facets (facets_desc.in ()); retv->receptacles (receptacle_desc.in ()); - retv->consumers (consumer_desc.in ()); + // retv->consumers (consumer_desc.in ()); retv->emitters (emitter_desc.in ()); retv->publishers (publisher_desc.in ()); @@ -219,12 +221,15 @@ namespace CIAO return retval._retn (); } + ::Components::ConsumerDescriptions * Servant_Impl_Base::get_all_consumers ( ACE_ENV_SINGLE_ARG_DECL ) ACE_THROW_SPEC ((CORBA::SystemException)) { + + ACE_DEBUG ((LM_DEBUG, "BEING CALLED\n")); ::Components::ConsumerDescriptions *tmp = 0; ACE_NEW_THROW_EX (tmp, ::Components::ConsumerDescriptions (this->consumer_table_.current_size ()), @@ -247,6 +252,7 @@ namespace CIAO return retval._retn (); } + ::Components::EventConsumerBase_ptr Servant_Impl_Base::get_consumer ( const char *sink_name diff --git a/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.h b/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.h index 0b21e6b3a4d..28b0ade0998 100644 --- a/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.h +++ b/TAO/CIAO/DAnCE/ciao/Servant_Impl_Base.h @@ -106,9 +106,11 @@ namespace CIAO get_all_facets (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); + virtual ::Components::ConsumerDescriptions * get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); + virtual ::Components::EventConsumerBase_ptr get_consumer (const char *sink_name diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections index 5adeef8a37d..9f7a372eb76 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections +++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections @@ -52,6 +52,16 @@ namespace Receiver_Impl this->ciao_uses_read_message_.in ()); } + /* + ::Components::ConsumerDescriptions * + Receiver_Context::get_all_consumers ( + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException)) + { + } + */ + void Receiver_Context::connect_read_message ( ::Hello::ReadMessage_ptr c @@ -168,6 +178,18 @@ namespace Receiver_Impl } } + /* + ::Components::ConsumerDescriptions * + Receiver_Servant::get_all_consumers ( + ACE_ENV_SINGLE_ARG_DECL + ) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + return this->context_->get_all_consumers ( + ACE_ENV_ARG_PARAMETER); + } + */ + Receiver_Servant::TimeOutConsumer_click_in_Servant::TimeOutConsumer_click_in_Servant ( ::Hello::CCM_Receiver_ptr executor, ::Hello::CCM_Receiver_Context_ptr c) diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections index 6159600a4f1..553ce363740 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections +++ b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections @@ -91,6 +91,12 @@ namespace Receiver_Impl protected: // Methods that manage this component's connections and consumers. + /* + virtual ::Components::ConsumerDescriptions * + get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + */ + virtual void connect_read_message ( ::Hello::ReadMessage_ptr @@ -166,6 +172,12 @@ namespace Receiver_Impl ::CORBA::SystemException, ::Components::NoConnection)); + /* + virtual ::Components::ConsumerDescriptions * + get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + */ + virtual ::Hello::ReadMessage_ptr get_connection_read_message ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.cpp b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.cpp index ba2c3edd5dd..ca1bf1698a4 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.cpp +++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_1.cpp @@ -107,12 +107,20 @@ Sender_Impl::Sender_exec_1_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_CHECK_RETURN (0); Hello::Sender_var sender = Hello::Sender::_narrow (comp_object.in () ACE_ENV_ARG_PARAMETER); + + Components::ConsumerDescriptions_var retval = + this->context_->get_registered_consumer ("click_out" + ACE_ENV_ARG_PARAMETER); + ACE_DEBUG ((LM_DEBUG, "length of consumers is %d\n", retval->length ())); + this->base_exec_->consumers (retval._retn ()); + /* ::Components::ConsumerDescriptions_var cons_desc = sender->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); ACE_DEBUG ((LM_DEBUG, "length of consumers is %d\n", cons_desc->length ())); - this->base_exec_->consumers (cons_desc._retn ()); + */ + // this->base_exec_->consumers (cons_desc._retn ()); } void diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.cpp b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.cpp index 2dc54e4eced..30d08a2f530 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.cpp +++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec_2.cpp @@ -101,7 +101,7 @@ Sender_Impl::Sender_exec_2_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) cnt != c->length (); ++cnt) { - sender->connect_consumer (c[cnt]->name (), + sender->subscribe ("click_out", (*c)[cnt]->consumer () ACE_ENV_ARG_PARAMETER); ACE_CHECK; diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections index 1780118da5a..beb105e851b 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections +++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections @@ -104,6 +104,56 @@ namespace Sender_Impl // Operations for Sender receptacles and event sources, // defined in ::Hello::CCM_Sender_Context. + ::Components::ConsumerDescriptions * + Sender_Context::get_registered_consumer ( + const char* publisher_name + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + ::Components::ConsumerDescriptions *tmp = 0; + ACE_NEW_THROW_EX (tmp, + ::Components::ConsumerDescriptions + (this->ciao_publishes_click_out_map_.current_size ()), + CORBA::NO_MEMORY ()); + ::Components::ConsumerDescriptions_var retval = tmp; + + retval->length (this->ciao_publishes_click_out_map_.current_size ()); + CORBA::ULong i = 0; + + ACE_Active_Map_Manager< + ::Hello::TimeOutConsumer_var>::iterator end = + this->ciao_publishes_click_out_map_.end (); + + for (ACE_Active_Map_Manager< + ::Hello::TimeOutConsumer_var>::iterator iter = + this->ciao_publishes_click_out_map_.begin (); + iter != end; + ++iter) + { + ACE_Active_Map_Manager< + ::Hello::TimeOutConsumer_var>::ENTRY &entry = *iter; + + ::Hello::TimeOutConsumer_var c = + ::Hello::TimeOutConsumer::_narrow ( + entry.int_id_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + ::Components::ConsumerDescription *cd = 0; + ACE_NEW_THROW_EX (cd, + OBV_Components::ConsumerDescription (), + CORBA::NO_MEMORY ()); + ::Components::ConsumerDescription_var safe = cd; + + safe->name (""); + safe->type_id (""); + safe->consumer (c); + + retval[i] = safe; + } + return retval._retn (); + } + void Sender_Context::push_click_out ( ::Hello::TimeOut *ev @@ -136,6 +186,59 @@ namespace Sender_Impl } } + /* + ::Components::ConsumerDescriptions * + Sender_Context::get_all_consumers ( + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException)) + { + ::Components::ConsumerDescriptions *tmp = 0; + ACE_NEW_THROW_EX (tmp, + ::Components::ConsumerDescriptions + (this->ciao_publishes_click_out_map_.current_size ()), + CORBA::NO_MEMORY ()); + ::Components::ConsumerDescriptions_var retval = tmp; + + retval->length (this->ciao_publishes_click_out_map_.current_size ()); + CORBA::ULong i = 0; + + ACE_Active_Map_Manager< + ::Hello::TimeOutConsumer_var>::iterator end = + this->ciao_publishes_click_out_map_.end (); + + for (ACE_Active_Map_Manager< + ::Hello::TimeOutConsumer_var>::iterator iter = + this->ciao_publishes_click_out_map_.begin (); + iter != end; + ++iter, ++i) + { + ACE_Active_Map_Manager< + ::Hello::TimeOutConsumer_var>::ENTRY &entry = *iter; + + ::Hello::TimeOutConsumer_var c = + ::Hello::TimeOutConsumer::_narrow ( + entry.int_id_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + ::Components::ConsumerDescription *cd = 0; + ACE_NEW_THROW_EX (cd, + OBV_Components::ConsumerDescription (), + CORBA::NO_MEMORY ()); + ::Components::ConsumerDescription_var safe = cd; + + safe->name (""); + safe->type_id (""); + safe->consumer (c); + + retval[i] = safe; + } + + return retval._retn (); + } + */ + ::Components::Cookie * Sender_Context::subscribe_click_out ( ::Hello::TimeOutConsumer_ptr c @@ -144,6 +247,7 @@ namespace Sender_Impl ::CORBA::SystemException, ::Components::ExceededConnectionLimit)) { + ACE_DEBUG ((LM_DEBUG, " calling subscribe_click_out\n")); if (CORBA::is_nil (c)) { ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); @@ -544,8 +648,10 @@ namespace Sender_Impl ::Components::InvalidConnection, ::Components::ExceededConnectionLimit)) { + ACE_DEBUG ((LM_DEBUG, "calling subscribe\n")); if (this->is_activated () == 0) { + ACE_DEBUG ((LM_DEBUG, "activating the servant\n")); this->ciao_preactivate ( ACE_ENV_SINGLE_ARG_PARAMETER); @@ -708,6 +814,18 @@ namespace Sender_Impl ACE_ENV_SINGLE_ARG_PARAMETER); } + /* + ::Components::ConsumerDescriptions * + Sender_Servant::get_all_consumers ( + ACE_ENV_SINGLE_ARG_DECL + ) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + return this->context_->get_all_consumers ( + ACE_ENV_ARG_PARAMETER); + } + */ + void Sender_Servant::local_message ( const char * local_message diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections index 8257c1902e3..97b425d6dfa 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections +++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections @@ -120,6 +120,11 @@ namespace Sender_Impl ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); + virtual ::Components::ConsumerDescriptions * + get_registered_consumer (const char *publisher_name + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + // CIAO-specific. static Sender_Context * @@ -130,6 +135,12 @@ namespace Sender_Impl protected: // Methods that manage this component's connections and consumers. + /* + virtual ::Components::ConsumerDescriptions * + get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + */ + virtual ::Components::Cookie * subscribe_click_out ( ::Hello::TimeOutConsumer_ptr c @@ -228,6 +239,12 @@ namespace Sender_Impl ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); + /* + virtual ::Components::ConsumerDescriptions * + get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + */ + // Operations for Receptacles interface. virtual ::Components::Cookie * |