TAO_Notify_SupplierAdmin Class Reference

Implementation of CosNotifyChannelAdmin::SupplierAdmin. More...

#include <SupplierAdmin.h>

Inheritance diagram for TAO_Notify_SupplierAdmin:

Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_SupplierAdmin:

Collaboration graph
[legend]
List of all members.

Public Types

typedef TAO_Notify_Refcountable_Guard_T<
TAO_Notify_SupplierAdmin
Ptr

Public Member Functions

 TAO_Notify_SupplierAdmin (void)
 Constuctor.

virtual ~TAO_Notify_SupplierAdmin ()
 Destructor.

void init (TAO_Notify_EventChannel *ec)
 Init.

virtual void _add_ref (void)
 ServantBase refcount methods.

virtual void _remove_ref (void)
virtual const char * get_admin_type_name () const
virtual TAO_Notify::Topology_Objectload_child (const ACE_CString &type, CORBA::Long id, const TAO_Notify::NVPList &attrs)
TAO_Notify_ProxyConsumerfind_proxy_consumer (TAO_Notify::IdVec &id_path, size_t position)
virtual void destroy (void)
 TAO_Notify_Container_T requires a destroy method.


Protected Member Functions

TAO_Notify::Topology_Objectload_proxy (CORBA::Long id, CosNotifyChannelAdmin::ClientType ctype, const TAO_Notify::NVPList &attrs)
CosNotifyChannelAdmin::ProxyConsumer_ptr obtain_notification_push_consumer_with_qos (CosNotifyChannelAdmin::ClientType ctype, CosNotifyChannelAdmin::ProxyID_out proxy_id, const CosNotification::QoSProperties &initial_qos)
 = NotifyExt::SupplierAdmin methods

virtual CosNotifyChannelAdmin::AdminID MyID (void)
 = CosNotifyChannelAdmin::SupplierAdmin methods

virtual::CosNotifyChannelAdmin::EventChannel_ptr MyChannel ()
virtual::CosNotifyChannelAdmin::InterFilterGroupOperator MyOperator ()
virtual::CosNotifyChannelAdmin::ProxyIDSeq * pull_consumers ()
virtual::CosNotifyChannelAdmin::ProxyIDSeq * push_consumers ()
virtual::CosNotifyChannelAdmin::ProxyConsumer_ptr get_proxy_consumer (CosNotifyChannelAdmin::ProxyID proxy_id)
virtual::CosNotifyChannelAdmin::ProxyConsumer_ptr obtain_notification_pull_consumer (CosNotifyChannelAdmin::ClientType ctype, CosNotifyChannelAdmin::ProxyID_out proxy_id)
virtual::CosNotifyChannelAdmin::ProxyConsumer_ptr obtain_notification_push_consumer (CosNotifyChannelAdmin::ClientType ctype, CosNotifyChannelAdmin::ProxyID_out proxy_id)
virtual::CosNotification::QoSProperties * get_qos (void)
 Get the QoS Properties.

virtual void set_qos (const CosNotification::QoSProperties &qos)
 Set the QoS Properties.

virtual void validate_qos (const CosNotification::QoSProperties &required_qos, CosNotification::NamedPropertyRangeSeq_out available_qos)
virtual void offer_change (const CosNotification::EventTypeSeq &added, const CosNotification::EventTypeSeq &removed)
virtual CosNotifyFilter::FilterID add_filter (CosNotifyFilter::Filter_ptr new_filter)
virtual void remove_filter (CosNotifyFilter::FilterID filter)
virtual::CosNotifyFilter::Filter_ptr get_filter (CosNotifyFilter::FilterID filter)
virtual::CosNotifyFilter::FilterIDSeq * get_all_filters ()
virtual void remove_all_filters (void)
virtual::CosEventChannelAdmin::ProxyPushConsumer_ptr obtain_push_consumer ()
virtual::CosEventChannelAdmin::ProxyPullConsumer_ptr obtain_pull_consumer ()

Private Member Functions

virtual void release (void)
 Release.


Detailed Description

Implementation of CosNotifyChannelAdmin::SupplierAdmin.

Definition at line 40 of file SupplierAdmin.h.


Member Typedef Documentation

typedef TAO_Notify_Refcountable_Guard_T< TAO_Notify_SupplierAdmin > TAO_Notify_SupplierAdmin::Ptr
 

Reimplemented from TAO_Notify_Refcountable.

Definition at line 45 of file SupplierAdmin.h.


Constructor & Destructor Documentation

TAO_Notify_SupplierAdmin::TAO_Notify_SupplierAdmin void   ) 
 

Constuctor.

Definition at line 36 of file SupplierAdmin.cpp.

00037   : TAO_Notify_Admin ()
00038 {
00039 }

TAO_Notify_SupplierAdmin::~TAO_Notify_SupplierAdmin  )  [virtual]
 

Destructor.

Definition at line 47 of file SupplierAdmin.cpp.

00048 {
00049 }


Member Function Documentation

void TAO_Notify_SupplierAdmin::_add_ref void   )  [virtual]
 

ServantBase refcount methods.

Definition at line 63 of file SupplierAdmin.cpp.

References TAO_Notify_Refcountable::_incr_refcnt().

00064 {
00065   this->_incr_refcnt ();
00066 }

void TAO_Notify_SupplierAdmin::_remove_ref void   )  [virtual]
 

Definition at line 69 of file SupplierAdmin.cpp.

References TAO_Notify_Refcountable::_decr_refcnt().

00070 {
00071   this->_decr_refcnt ();
00072 }

CosNotifyFilter::FilterID TAO_Notify_SupplierAdmin::add_filter CosNotifyFilter::Filter_ptr  new_filter  )  [protected, virtual]
 

Definition at line 251 of file SupplierAdmin.cpp.

References TAO_Notify_FilterAdmin::add_filter(), CosNotifyFilter::FilterID, and TAO_Notify::Topology_Object::self_change().

00252 {
00253   CosNotifyFilter::FilterID fid =
00254     this->filter_admin_.add_filter (new_filter);
00255   this->self_change ();
00256   return fid;
00257 }

void TAO_Notify_SupplierAdmin::destroy void   )  [virtual]
 

TAO_Notify_Container_T requires a destroy method.

Definition at line 82 of file SupplierAdmin.cpp.

References TAO_Notify_Admin::proxy_container(), and TAO_Notify_Admin::shutdown().

00083 {
00084   this->shutdown ();
00085   this->ec_->remove (this);
00086   this->proxy_container ().destroy ();
00087 }

TAO_Notify_ProxyConsumer * TAO_Notify_SupplierAdmin::find_proxy_consumer TAO_Notify::IdVec id_path,
size_t  position
 

Definition at line 313 of file SupplierAdmin.cpp.

References TAO_Notify::IdVec, ACE_Vector< T, DEFAULT_SIZE >::size(), TAO_Notify_Proxy, and TAO_Notify_ProxyConsumer_Find_Worker.

Referenced by TAO_Notify_EventChannel::find_proxy_consumer().

00316 {
00317   TAO_Notify_ProxyConsumer * result = 0;
00318   size_t path_size = id_path.size ();
00319   if (position < path_size)
00320   {
00321     TAO_Notify_ProxyConsumer_Find_Worker find_worker;
00322     TAO_Notify_Proxy * proxy = find_worker.find (id_path[position], this->proxy_container());
00323     result = dynamic_cast <TAO_Notify_ProxyConsumer *> (proxy);
00324   }
00325   return result;
00326 }

const char * TAO_Notify_SupplierAdmin::get_admin_type_name  )  const [virtual]
 

Implements TAO_Notify_Admin.

Definition at line 42 of file SupplierAdmin.cpp.

00043 {
00044   return "supplier_admin";
00045 }

CosNotifyFilter::FilterIDSeq * TAO_Notify_SupplierAdmin::get_all_filters  )  [protected]
 

Definition at line 272 of file SupplierAdmin.cpp.

References TAO_Notify_FilterAdmin::get_all_filters().

00273 {
00274   return this->filter_admin_.get_all_filters ();
00275 }

CosNotifyFilter::Filter_ptr TAO_Notify_SupplierAdmin::get_filter CosNotifyFilter::FilterID  filter  )  [protected]
 

Definition at line 266 of file SupplierAdmin.cpp.

References CosNotifyFilter::FilterID, and TAO_Notify_FilterAdmin::get_filter().

00267 {
00268   return this->filter_admin_.get_filter (filter);
00269 }

CosNotifyChannelAdmin::ProxyConsumer_ptr TAO_Notify_SupplierAdmin::get_proxy_consumer CosNotifyChannelAdmin::ProxyID  proxy_id  )  [protected]
 

Definition at line 222 of file SupplierAdmin.cpp.

References CosNotifyChannelAdmin::ProxyID, and TAO_Notify_ProxyConsumer_Find_Worker.

00223 {
00224   TAO_Notify_ProxyConsumer_Find_Worker find_worker;
00225 
00226   return find_worker.resolve (proxy_id, this->proxy_container());
00227 }

CosNotification::QoSProperties * TAO_Notify_SupplierAdmin::get_qos void   )  [protected]
 

Get the QoS Properties.

Reimplemented from TAO_Notify_Object.

Definition at line 149 of file SupplierAdmin.cpp.

References TAO_Notify_Object::get_qos().

00150 {
00151   return this->TAO_Notify_Object::get_qos ();
00152 }

void TAO_Notify_SupplierAdmin::init TAO_Notify_EventChannel ec  ) 
 

Init.

Definition at line 52 of file SupplierAdmin.cpp.

References TAO_Notify_Properties::default_supplier_admin_qos_properties(), TAO_Notify_Admin::init(), TAO_Notify_Properties::instance(), CosNotification::QoSProperties, and set_qos().

Referenced by TAO_Notify_Builder::build_supplier_admin().

00053 {
00054   TAO_Notify_Admin::init (ec);
00055 
00056   const CosNotification::QoSProperties &default_sa_qos =
00057     TAO_Notify_PROPERTIES::instance ()->default_supplier_admin_qos_properties ();
00058 
00059   this->set_qos (default_sa_qos);
00060 }

TAO_Notify::Topology_Object * TAO_Notify_SupplierAdmin::load_child const ACE_CString type,
CORBA::Long  id,
const TAO_Notify::NVPList attrs
[virtual]
 

Reimplemented from TAO_Notify_Admin.

Definition at line 90 of file SupplierAdmin.cpp.

References ACE_DEBUG, ACE_TEXT(), DEBUG_LEVEL, LM_DEBUG, TAO_Notify_Admin::load_child(), and load_proxy().

00092 {
00093   TAO_Notify::Topology_Object* result = this;
00094   if (type == "proxy_push_consumer")
00095   {
00096     if (DEBUG_LEVEL) ACE_DEBUG ((LM_DEBUG,
00097       ACE_TEXT ("(%P|%t) Admin reload proxy %d\n")
00098       , static_cast<int> (id)
00099       ));
00100     result = this->load_proxy(id, CosNotifyChannelAdmin::ANY_EVENT, attrs);
00101   }
00102   else if (type == "structured_proxy_push_consumer")
00103   {
00104     if (DEBUG_LEVEL) ACE_DEBUG ((LM_DEBUG,
00105       ACE_TEXT ("(%P|%t) Admin reload proxy %d\n")
00106       , static_cast<int> (id)
00107       ));
00108     result = this->load_proxy(id, CosNotifyChannelAdmin::STRUCTURED_EVENT, attrs);
00109   }
00110   else if (type == "sequence_proxy_push_consumer")
00111   {
00112     if (DEBUG_LEVEL) ACE_DEBUG ((LM_DEBUG,
00113       ACE_TEXT ("(%P|%t) Admin reload proxy %d\n")
00114       , static_cast<int> (id)
00115       ));
00116     result = this->load_proxy(id, CosNotifyChannelAdmin::SEQUENCE_EVENT, attrs);
00117   }
00118   else
00119   {
00120     result = TAO_Notify_Admin::load_child (type, id, attrs);
00121   }
00122   return result;
00123 }

TAO_Notify::Topology_Object * TAO_Notify_SupplierAdmin::load_proxy CORBA::Long  id,
CosNotifyChannelAdmin::ClientType  ctype,
const TAO_Notify::NVPList attrs
[protected]
 

Definition at line 126 of file SupplierAdmin.cpp.

References ACE_ASSERT, TAO_Notify_Builder::build_proxy(), TAO_Notify_Properties::builder(), TAO_Notify_Properties::instance(), and TAO_Notify_Object::load_attrs().

Referenced by load_child().

00130 {
00131   TAO_Notify_Builder* bld = TAO_Notify_PROPERTIES::instance()->builder();
00132   TAO_Notify_ProxyConsumer * proxy =
00133     bld->build_proxy (this
00134                , ctype
00135                , id);
00136   ACE_ASSERT(proxy != 0);
00137   proxy->load_attrs (attrs);
00138   return proxy;
00139 }

CosNotifyChannelAdmin::EventChannel_ptr TAO_Notify_SupplierAdmin::MyChannel  )  [protected]
 

Definition at line 202 of file SupplierAdmin.cpp.

00203 {
00204   return this->ec_->_this ();
00205 }

CosNotifyChannelAdmin::AdminID TAO_Notify_SupplierAdmin::MyID void   )  [protected, virtual]
 

= CosNotifyChannelAdmin::SupplierAdmin methods

Definition at line 196 of file SupplierAdmin.cpp.

References TAO_Notify_Object::id().

00197 {
00198   return this->id ();
00199 }

CosNotifyChannelAdmin::InterFilterGroupOperator TAO_Notify_SupplierAdmin::MyOperator  )  [protected]
 

Definition at line 208 of file SupplierAdmin.cpp.

00209 {
00210   return this->filter_operator_;
00211 }

CosNotifyChannelAdmin::ProxyConsumer_ptr TAO_Notify_SupplierAdmin::obtain_notification_pull_consumer CosNotifyChannelAdmin::ClientType  ctype,
CosNotifyChannelAdmin::ProxyID_out  proxy_id
[protected]
 

Definition at line 306 of file SupplierAdmin.cpp.

00308 {
00309   throw CORBA::NO_IMPLEMENT ();
00310 }

CosNotifyChannelAdmin::ProxyConsumer_ptr TAO_Notify_SupplierAdmin::obtain_notification_push_consumer CosNotifyChannelAdmin::ClientType  ctype,
CosNotifyChannelAdmin::ProxyID_out  proxy_id
[protected]
 

Definition at line 155 of file SupplierAdmin.cpp.

References TAO_Notify_Builder::build_proxy(), TAO_Notify_Properties::builder(), TAO_Notify_Properties::instance(), CosNotification::QoSProperties, and TAO_Notify::Topology_Object::self_change().

00158 {
00159   CosNotification::QoSProperties initial_qos;
00160 
00161   CosNotifyChannelAdmin::ProxyConsumer_var proxy =
00162     TAO_Notify_PROPERTIES::instance()->builder()->build_proxy (this
00163                                                                 , ctype
00164                                                                 , proxy_id
00165                                                                 , initial_qos);
00166   this->self_change ();
00167   return proxy._retn ();
00168 }

CosNotifyChannelAdmin::ProxyConsumer_ptr TAO_Notify_SupplierAdmin::obtain_notification_push_consumer_with_qos CosNotifyChannelAdmin::ClientType  ctype,
CosNotifyChannelAdmin::ProxyID_out  proxy_id,
const CosNotification::QoSProperties initial_qos
[protected]
 

= NotifyExt::SupplierAdmin methods

Definition at line 171 of file SupplierAdmin.cpp.

References TAO_Notify_Builder::build_proxy(), TAO_Notify_Properties::builder(), TAO_Notify_Properties::instance(), CosNotification::QoSProperties, and TAO_Notify::Topology_Object::self_change().

00175 {
00176   CosNotifyChannelAdmin::ProxyConsumer_var proxy =
00177     TAO_Notify_PROPERTIES::instance()->builder()->build_proxy (this
00178                                                                 , ctype
00179                                                                 , proxy_id,
00180                                                                 initial_qos);
00181   this->self_change ();
00182   return proxy._retn ();
00183 }

CosEventChannelAdmin::ProxyPullConsumer_ptr TAO_Notify_SupplierAdmin::obtain_pull_consumer  )  [protected]
 

Definition at line 286 of file SupplierAdmin.cpp.

00287 {
00288   throw CORBA::NO_IMPLEMENT ();
00289 }

CosEventChannelAdmin::ProxyPushConsumer_ptr TAO_Notify_SupplierAdmin::obtain_push_consumer  )  [protected]
 

Definition at line 187 of file SupplierAdmin.cpp.

References TAO_Notify_Builder::build_proxy(), TAO_Notify_Properties::builder(), TAO_Notify_Properties::instance(), and TAO_Notify::Topology_Object::self_change().

00188 {
00189   CosEventChannelAdmin::ProxyPushConsumer_var proxy =
00190     TAO_Notify_PROPERTIES::instance()->builder()->build_proxy (this);
00191   this->self_change ();
00192   return proxy._retn ();
00193 }

void TAO_Notify_SupplierAdmin::offer_change const CosNotification::EventTypeSeq added,
const CosNotification::EventTypeSeq removed
[protected, virtual]
 

Definition at line 230 of file SupplierAdmin.cpp.

References ACE_GUARD_THROW_EX, TAO_Notify_EventTypeSeq::add_and_remove(), CosNotification::EventTypeSeq, TAO_Notify_Admin::proxy_container(), and TAO_SYNCH_MUTEX.

00234 {
00235   TAO_Notify_EventTypeSeq seq_added (added);
00236   TAO_Notify_EventTypeSeq seq_removed (removed);
00237 
00238   {
00239     ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
00240                         CORBA::INTERNAL ());
00241 
00242     this->subscribed_types_.add_and_remove (seq_added, seq_removed);
00243 
00244     TAO_Notify_Subscription_Change_Worker worker (added, removed);
00245 
00246     this->proxy_container().collection ()->for_each (&worker);
00247   }
00248 }

CosNotifyChannelAdmin::ProxyIDSeq * TAO_Notify_SupplierAdmin::pull_consumers  )  [protected]
 

Definition at line 292 of file SupplierAdmin.cpp.

00293 {
00294   throw CORBA::NO_IMPLEMENT ();
00295 }

CosNotifyChannelAdmin::ProxyIDSeq * TAO_Notify_SupplierAdmin::push_consumers  )  [protected]
 

Definition at line 214 of file SupplierAdmin.cpp.

References TAO_Notify_Seq_Worker_T< TYPE >::create(), and TAO_Notify_Proxy_Seq_Worker.

00215 {
00216   TAO_Notify_Proxy_Seq_Worker seq_worker;
00217 
00218   return seq_worker.create (this->proxy_container());
00219 }

void TAO_Notify_SupplierAdmin::release void   )  [private, virtual]
 

Release.

Implements TAO_Notify_Refcountable.

Definition at line 75 of file SupplierAdmin.cpp.

00076 {
00077   delete this;
00078   //@@ inform factory
00079 }

void TAO_Notify_SupplierAdmin::remove_all_filters void   )  [protected, virtual]
 

Definition at line 278 of file SupplierAdmin.cpp.

References TAO_Notify_FilterAdmin::remove_all_filters().

00279 {
00280   this->filter_admin_.remove_all_filters ();
00281 }

void TAO_Notify_SupplierAdmin::remove_filter CosNotifyFilter::FilterID  filter  )  [protected, virtual]
 

Definition at line 260 of file SupplierAdmin.cpp.

References CosNotifyFilter::FilterID, and TAO_Notify_FilterAdmin::remove_filter().

00261 {
00262   this->filter_admin_.remove_filter (filter);
00263 }

void TAO_Notify_SupplierAdmin::set_qos const CosNotification::QoSProperties qos  )  [protected, virtual]
 

Set the QoS Properties.

Reimplemented from TAO_Notify_Object.

Definition at line 143 of file SupplierAdmin.cpp.

References CosNotification::QoSProperties, and TAO_Notify_Object::set_qos().

Referenced by init().

00144 {
00145   this->TAO_Notify_Object::set_qos (qos);
00146 }

void TAO_Notify_SupplierAdmin::validate_qos const CosNotification::QoSProperties required_qos,
CosNotification::NamedPropertyRangeSeq_out  available_qos
[protected, virtual]
 

Definition at line 299 of file SupplierAdmin.cpp.

References CosNotification::QoSProperties.

00301 {
00302   throw CORBA::NO_IMPLEMENT ();
00303 }


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 15:51:40 2008 for TAO_CosNotification by doxygen 1.3.6