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)
 Constructor.
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)
 Create a child of the appropriate type and return it.
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 (void)
virtual ::CosNotifyChannelAdmin::InterFilterGroupOperator MyOperator (void)
virtual ::CosNotifyChannelAdmin::ProxyIDSeqpull_consumers (void)
virtual ::CosNotifyChannelAdmin::ProxyIDSeqpush_consumers (void)
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::QoSPropertiesget_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::FilterIDSeqget_all_filters (void)
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   ) 

Constructor.

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 249 of file SupplierAdmin.cpp.

References TAO_Notify_FilterAdmin::add_filter(), TAO_Notify_Admin::filter_admin_, and TAO_Notify::Topology_Object::self_change().

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

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::ec_, 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 282 of file SupplierAdmin.cpp.

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

Referenced by TAO_Notify_EventChannel::find_proxy_consumer().

00285 {
00286   TAO_Notify_ProxyConsumer * result = 0;
00287   size_t path_size = id_path.size ();
00288   if (position < path_size)
00289   {
00290     TAO_Notify_ProxyConsumer_Find_Worker find_worker;
00291     TAO_Notify_Proxy * proxy = find_worker.find (id_path[position], this->proxy_container());
00292     result = dynamic_cast <TAO_Notify_ProxyConsumer *> (proxy);
00293   }
00294   return result;
00295 }

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 ( void   )  [protected]

Definition at line 270 of file SupplierAdmin.cpp.

References TAO_Notify_Admin::filter_admin_, and TAO_Notify_FilterAdmin::get_all_filters().

00271 {
00272   return this->filter_admin_.get_all_filters ();
00273 }

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

Definition at line 264 of file SupplierAdmin.cpp.

References TAO_Notify_Admin::filter_admin_, and TAO_Notify_FilterAdmin::get_filter().

00265 {
00266   return this->filter_admin_.get_filter (filter);
00267 }

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

Definition at line 221 of file SupplierAdmin.cpp.

References TAO_Notify_ProxyConsumer_Find_Worker.

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

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(), 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]

Create a child of the appropriate type and return it.

Use "type" as passed in to determine what kind of child (supporting the Topology_Object interface) to create and return. Inform it of its new ID.

Reimplemented from TAO_Notify_Admin.

Definition at line 90 of file SupplierAdmin.cpp.

References ACE_DEBUG, ACE_TEXT(), CosNotifyChannelAdmin::ANY_EVENT, DEBUG_LEVEL, LM_DEBUG, TAO_Notify_Admin::load_child(), load_proxy(), CosNotifyChannelAdmin::SEQUENCE_EVENT, and CosNotifyChannelAdmin::STRUCTURED_EVENT.

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 ( void   )  [protected]

Definition at line 201 of file SupplierAdmin.cpp.

References TAO_Notify_Admin::ec_.

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

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

= CosNotifyChannelAdmin::SupplierAdmin methods

Definition at line 195 of file SupplierAdmin.cpp.

References TAO_Notify_Object::id().

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

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

Definition at line 207 of file SupplierAdmin.cpp.

References TAO_Notify_Admin::filter_operator_.

00208 {
00209   return this->filter_operator_;
00210 }

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

Definition at line 320 of file SupplierAdmin.cpp.

00322 {
00323   throw CORBA::NO_IMPLEMENT ();
00324 }

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(), 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(), and TAO_Notify::Topology_Object::self_change().

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

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

Definition at line 300 of file SupplierAdmin.cpp.

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

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

Definition at line 186 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().

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

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

Definition at line 229 of file SupplierAdmin.cpp.

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

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

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

Definition at line 306 of file SupplierAdmin.cpp.

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

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

Definition at line 213 of file SupplierAdmin.cpp.

References TAO_Notify_Seq_Worker_T< TYPE >::create().

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

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 276 of file SupplierAdmin.cpp.

References TAO_Notify_Admin::filter_admin_, and TAO_Notify_FilterAdmin::remove_all_filters().

00277 {
00278   this->filter_admin_.remove_all_filters ();
00279 }

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

Definition at line 258 of file SupplierAdmin.cpp.

References TAO_Notify_Admin::filter_admin_, and TAO_Notify_FilterAdmin::remove_filter().

00259 {
00260   this->filter_admin_.remove_filter (filter);
00261 }

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 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 313 of file SupplierAdmin.cpp.

00315 {
00316   throw CORBA::NO_IMPLEMENT ();
00317 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:46:33 2010 for TAO_CosNotification by  doxygen 1.4.7