diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp index d958167541c..e615a5c588a 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp @@ -20,6 +20,9 @@ ACE_RCSID(Notify, #include "orbsvcs/Notify/Find_Worker_T.h" #include "orbsvcs/Notify/Seq_Worker_T.h" #include "orbsvcs/Notify/POA_Helper.h" +#include "orbsvcs/Notify/Validate_Worker_T.h" +#include "orbsvcs/Notify/Validate_Client_Task.h" +#include "orbsvcs/Notify/FilterFactory.h" #include "ace/Dynamic_Service.h" @@ -79,6 +82,8 @@ TAO_Notify_EventChannelFactory::destroy (void) void TAO_Notify_EventChannelFactory::init (PortableServer::POA_ptr poa) { + this->poa_ = PortableServer::POA::_duplicate (poa); + ACE_ASSERT (this->ec_container_.get() == 0); // Init ec_container_ @@ -116,6 +121,17 @@ TAO_Notify_EventChannelFactory::init (PortableServer::POA_ptr poa) this->load_topology (); this->load_event_persistence (); + + if (TAO_Notify_PROPERTIES::instance()->validate_client() == true) + { + TAO_Notify_validate_client_Task* validate_client_task = 0; + ACE_NEW_THROW_EX (validate_client_task, + TAO_Notify_validate_client_Task (TAO_Notify_PROPERTIES::instance()->validate_client_delay (), + TAO_Notify_PROPERTIES::instance()->validate_client_interval (), + this), + CORBA::INTERNAL ()); + this->validate_client_task_.reset (validate_client_task); + } } void @@ -147,6 +163,8 @@ TAO_Notify_EventChannelFactory::remove (TAO_Notify_EventChannel* event_channel) int TAO_Notify_EventChannelFactory::shutdown (void) { + this->stop_validator(); + if (TAO_Notify_Object::shutdown () == 1) return 1; @@ -155,6 +173,7 @@ TAO_Notify_EventChannelFactory::shutdown (void) return 0; } + CosNotifyChannelAdmin::EventChannel_ptr TAO_Notify_EventChannelFactory::create_named_channel ( const CosNotification::QoSProperties& initial_qos, @@ -165,6 +184,7 @@ TAO_Notify_EventChannelFactory::create_named_channel ( return this->create_channel (initial_qos, initial_admin, id); } + ::CosNotifyChannelAdmin::EventChannel_ptr TAO_Notify_EventChannelFactory::create_channel ( const CosNotification::QoSProperties & initial_qos, const CosNotification::AdminProperties & initial_admin, @@ -228,6 +248,24 @@ TAO_Notify_EventChannelFactory::load_topology (void) } this->loading_topology_ = false; } + +void +TAO_Notify_EventChannelFactory::validate () +{ + TAO_Notify::Validate_Worker<TAO_Notify_EventChannel> wrk; + + this->ec_container().collection()->for_each(&wrk); +} + +void +TAO_Notify_EventChannelFactory::stop_validator () +{ + if (this->validate_client_task_.get () != 0) + { + this->validate_client_task_->shutdown (); + } +} + bool TAO_Notify_EventChannelFactory::is_persistent () const { @@ -502,4 +540,5 @@ TAO_Notify_EventChannelFactory::ec_container() return *ec_container_; } + TAO_END_VERSIONED_NAMESPACE_DECL |