Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends

TAO_Notify_EventChannel Class Reference

Implementation of CosNotifyChannelAdmin::EventChannel. More...

#include <EventChannel.h>

Inheritance diagram for TAO_Notify_EventChannel:
Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_EventChannel:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
TAO_Notify_Refcountable_Guard_T
< TAO_Notify_EventChannel
Ptr
typedef
CosNotifyChannelAdmin::ChannelIDSeq 
SEQ
typedef
CosNotifyChannelAdmin::ChannelIDSeq_var 
SEQ_VAR

Public Member Functions

 TAO_Notify_EventChannel (void)
 Constructor.
virtual ~TAO_Notify_EventChannel ()
 Destructor.
void init (TAO_Notify_EventChannelFactory *ecf, const CosNotification::QoSProperties &initial_qos, const CosNotification::AdminProperties &initial_admin)
 Init.
void init (TAO_Notify::Topology_Parent *parent)
 Init (for reload).
void remove (TAO_Notify_ConsumerAdmin *consumer_admin)
 Remove ConsumerAdmin from its container.
void remove (TAO_Notify_SupplierAdmin *supplier_admin)
 Remove SupplierAdmin from its container.
virtual void _add_ref (void)
 ServantBase refcount methods.
virtual void _remove_ref (void)
virtual void save_persistent (TAO_Notify::Topology_Saver &saver)
virtual
TAO_Notify::Topology_Object
load_child (const ACE_CString &type, CORBA::Long id, const TAO_Notify::NVPList &attrs)
 Create a child of the appropriate type and return it.
virtual void reconnect (void)
virtual void validate ()
virtual TAO_Notify_Object::ID get_id () const
 Find the id associated with topology object.
TAO_Notify_ProxyConsumerfind_proxy_consumer (TAO_Notify::IdVec &id_path, size_t position)
TAO_Notify_ProxySupplierfind_proxy_supplier (TAO_Notify::IdVec &id_path, size_t position)
virtual void cleanup_proxy (CosNotifyChannelAdmin::ProxyID id, bool is_supplier, bool experienced_timeout)
virtual int shutdown (void)
 Shutdown.
virtual void load_attrs (const TAO_Notify::NVPList &attrs)
virtual void destroy (void)
 TAO_Notify_Container_T requires a destroy method.
virtual
CosNotifyChannelAdmin::ConsumerAdmin_ptr 
get_consumeradmin (CosNotifyChannelAdmin::AdminID id)
 This is public to allow TAO_MonitorConsumerAdmin access.
virtual
CosNotifyChannelAdmin::SupplierAdmin_ptr 
get_supplieradmin (CosNotifyChannelAdmin::AdminID id)
 This is public to allow TAO_MonitorSupplierAdmin access.
TAO_Notify_FilterFactorydefault_filter_factory_servant () const

Protected Member Functions

virtual
::CosNotifyChannelAdmin::EventChannelFactory_ptr 
MyFactory ()
 =CosNotifyChannelAdminEventChannel methods
virtual
::CosNotifyChannelAdmin::ConsumerAdmin_ptr 
default_consumer_admin (void)
virtual
::CosNotifyChannelAdmin::SupplierAdmin_ptr 
default_supplier_admin (void)
virtual
::CosNotifyFilter::FilterFactory_ptr 
default_filter_factory (void)
virtual
::CosNotifyChannelAdmin::ConsumerAdmin_ptr 
new_for_consumers (CosNotifyChannelAdmin::InterFilterGroupOperator op, CosNotifyChannelAdmin::AdminID_out id)
virtual
::CosNotifyChannelAdmin::SupplierAdmin_ptr 
new_for_suppliers (CosNotifyChannelAdmin::InterFilterGroupOperator op, CosNotifyChannelAdmin::AdminID_out id)
virtual
::CosNotifyChannelAdmin::AdminIDSeq
get_all_consumeradmins (void)
virtual
::CosNotifyChannelAdmin::AdminIDSeq
get_all_supplieradmins (void)
virtual
::CosNotification::QoSProperties
get_qos (void)
virtual void set_qos (const CosNotification::QoSProperties &qos)
virtual void validate_qos (const CosNotification::QoSProperties &required_qos, CosNotification::NamedPropertyRangeSeq_out available_qos)
virtual
::CosNotification::AdminProperties
get_admin (void)
virtual void set_admin (const CosNotification::AdminProperties &admin)
virtual
::CosEventChannelAdmin::ConsumerAdmin_ptr 
for_consumers (void)
virtual
::CosEventChannelAdmin::SupplierAdmin_ptr 
for_suppliers (void)

Private Types

typedef TAO_Notify_Container_T
< TAO_Notify_ConsumerAdmin
TAO_Notify_ConsumerAdmin_Container
typedef TAO_Notify_Container_T
< TAO_Notify_SupplierAdmin
TAO_Notify_SupplierAdmin_Container

Private Member Functions

virtual void save_attrs (TAO_Notify::NVPList &attrs)
TAO_Notify_ConsumerAdmin_Containerca_container ()
TAO_Notify_SupplierAdmin_Containersa_container ()
virtual void release (void)

Private Attributes

TAO_Notify_EventChannelFactory::Ptr ecf_
TAO_SYNCH_MUTEX default_admin_mutex_
CosNotifyChannelAdmin::ConsumerAdmin_var default_consumer_admin_
 Default Consumer Admin.
CosNotifyChannelAdmin::SupplierAdmin_var default_supplier_admin_
 Default Supplier Admin.
ACE_Auto_Ptr
< TAO_Notify_ConsumerAdmin_Container
ca_container_
 ConsumerAdmin Container.
ACE_Auto_Ptr
< TAO_Notify_SupplierAdmin_Container
sa_container_
 SupplierAdmin Container.
CosNotifyFilter::FilterFactory_var default_filter_factory_
 The default filter factory.
TAO_Notify_FilterFactorydefault_filter_factory_servant_

Friends

class TAO_Notify_Builder

Detailed Description

Implementation of CosNotifyChannelAdmin::EventChannel.

Definition at line 50 of file EventChannel.h.


Member Typedef Documentation

Definition at line 57 of file EventChannel.h.

Definition at line 58 of file EventChannel.h.

typedef CosNotifyChannelAdmin::ChannelIDSeq_var TAO_Notify_EventChannel::SEQ_VAR

Definition at line 59 of file EventChannel.h.

Definition at line 122 of file EventChannel.h.

Definition at line 123 of file EventChannel.h.


Constructor & Destructor Documentation

TAO_Notify_EventChannel::TAO_Notify_EventChannel ( void   ) 

Constructor.

Definition at line 47 of file EventChannel.cpp.

  : ecf_ (0)
  , ca_container_ (0)
  , sa_container_ (0)
  , default_filter_factory_ (CosNotifyFilter::FilterFactory::_nil ())
  , default_filter_factory_servant_ (0)
{
}

TAO_Notify_EventChannel::~TAO_Notify_EventChannel (  )  [virtual]

Destructor.

Definition at line 56 of file EventChannel.cpp.

{
}


Member Function Documentation

void TAO_Notify_EventChannel::_add_ref ( void   )  [virtual]

ServantBase refcount methods.

Definition at line 186 of file EventChannel.cpp.

{
  this->_incr_refcnt ();
}

void TAO_Notify_EventChannel::_remove_ref ( void   )  [virtual]

Definition at line 192 of file EventChannel.cpp.

{
  this->_decr_refcnt ();
}

TAO_Notify_EventChannel::TAO_Notify_ConsumerAdmin_Container & TAO_Notify_EventChannel::ca_container (  )  [private]

Definition at line 609 of file EventChannel.cpp.

{
  ACE_ASSERT( this->ca_container_.get() != 0 );
  return *ca_container_;
}

void TAO_Notify_EventChannel::cleanup_proxy ( CosNotifyChannelAdmin::ProxyID  id,
bool  is_supplier,
bool  experienced_timeout 
) [virtual]

Definition at line 205 of file EventChannel.cpp.

{
}

CosNotifyChannelAdmin::ConsumerAdmin_ptr TAO_Notify_EventChannel::default_consumer_admin ( void   )  [protected]

Definition at line 279 of file EventChannel.cpp.

{
  if (CORBA::is_nil (default_consumer_admin_.in ()))
    {
      ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->default_admin_mutex_, CosNotifyChannelAdmin::ConsumerAdmin::_nil());
      if (CORBA::is_nil (default_consumer_admin_.in ()))
        {
          CosNotifyChannelAdmin::AdminID id;
          this->default_consumer_admin_ =
            this->new_for_consumers (TAO_Notify_PROPERTIES::instance ()->defaultConsumerAdminFilterOp(), id);
          // Wish there was a better way to do this!
          PortableServer::ServantBase * admin_servant =
            this->poa()->reference_to_servant (
              this->default_consumer_admin_.in ());
          TAO_Notify_Admin * pAdmin = dynamic_cast <TAO_Notify_Admin *> (admin_servant);
          ACE_ASSERT (pAdmin != 0); // if this assert triggers, we have mixed implementations?
          if (pAdmin != 0)
            {
              pAdmin->set_default (true);
            }
        }
    }

  return CosNotifyChannelAdmin::ConsumerAdmin::_duplicate (this->default_consumer_admin_.in ());
}

CosNotifyFilter::FilterFactory_ptr TAO_Notify_EventChannel::default_filter_factory ( void   )  [protected]

Definition at line 331 of file EventChannel.cpp.

{
  return CosNotifyFilter::FilterFactory::_duplicate (this->default_filter_factory_.in ());
}

TAO_Notify_FilterFactory * TAO_Notify_EventChannel::default_filter_factory_servant (  )  const

Definition at line 337 of file EventChannel.cpp.

CosNotifyChannelAdmin::SupplierAdmin_ptr TAO_Notify_EventChannel::default_supplier_admin ( void   )  [protected]

Definition at line 306 of file EventChannel.cpp.

{
  if (CORBA::is_nil (default_supplier_admin_.in ()))
    {
      ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->default_admin_mutex_, CosNotifyChannelAdmin::SupplierAdmin::_nil());
      if (CORBA::is_nil (default_supplier_admin_.in ()))
        {
          CosNotifyChannelAdmin::AdminID id;
          this->default_supplier_admin_ =
            this->new_for_suppliers (TAO_Notify_PROPERTIES::instance ()->defaultSupplierAdminFilterOp(), id);
          PortableServer::ServantBase * admin_servant =
            this->poa()->poa()->reference_to_servant (
              this->default_supplier_admin_.in ());
          TAO_Notify_Admin * pAdmin = dynamic_cast <TAO_Notify_Admin *> (admin_servant);
          ACE_ASSERT (pAdmin != 0); // if this assert triggers, we have mixed implementations?
          if (pAdmin != 0)
            {
              pAdmin->set_default (true);
            }
        }
    }
  return CosNotifyChannelAdmin::SupplierAdmin::_duplicate (this->default_supplier_admin_.in ());
}

void TAO_Notify_EventChannel::destroy ( void   )  [virtual]

TAO_Notify_Container_T requires a destroy method.

Definition at line 228 of file EventChannel.cpp.

{
  TAO_Notify_EventChannel::Ptr guard( this );

  if (this->shutdown () == 1)
    return;

  this->ecf_->remove (this);

  this->sa_container ().destroy ();
  this->ca_container ().destroy ();

  this->sa_container_.reset( 0 );
  this->ca_container_.reset( 0 );

  this->default_filter_factory_ = CosNotifyFilter::FilterFactory::_nil();

  this->default_filter_factory_servant_->destroy();
}

TAO_Notify_ProxyConsumer * TAO_Notify_EventChannel::find_proxy_consumer ( TAO_Notify::IdVec id_path,
size_t  position 
)

Definition at line 562 of file EventChannel.cpp.

{
  TAO_Notify_ProxyConsumer * result = 0;
  size_t path_size = id_path.size ();
  if (position < path_size)
  {
    TAO_Notify_SupplierAdmin_Find_Worker find_worker;
    TAO_Notify_SupplierAdmin * admin = find_worker.find (id_path[position], this->sa_container());
    ++position;
    if (admin != 0)
    {
      result = admin->find_proxy_consumer (id_path, position);
    }
  }
  return result;
}

TAO_Notify_ProxySupplier * TAO_Notify_EventChannel::find_proxy_supplier ( TAO_Notify::IdVec id_path,
size_t  position 
)

Definition at line 580 of file EventChannel.cpp.

{
  TAO_Notify_ProxySupplier * result = 0;
  size_t path_size = id_path.size ();
  if (position < path_size)
  {
    TAO_Notify_ConsumerAdmin_Find_Worker find_worker;
    TAO_Notify_ConsumerAdmin * admin = find_worker.find (id_path[position], this->ca_container());
    ++position;
    if (admin != 0)
    {
      result = admin->find_proxy_supplier (id_path, position);
    }
  }
  return result;
}

CosEventChannelAdmin::ConsumerAdmin_ptr TAO_Notify_EventChannel::for_consumers ( void   )  [protected]

Definition at line 427 of file EventChannel.cpp.

{
  return this->default_consumer_admin();
}

CosEventChannelAdmin::SupplierAdmin_ptr TAO_Notify_EventChannel::for_suppliers ( void   )  [protected]

Definition at line 433 of file EventChannel.cpp.

{
  return this->default_supplier_admin ();
}

CosNotification::AdminProperties * TAO_Notify_EventChannel::get_admin ( void   )  [protected]

Definition at line 413 of file EventChannel.cpp.

{
  CosNotification::AdminProperties_var properties;

  ACE_NEW_THROW_EX (properties,
                    CosNotification::AdminProperties (),
                    CORBA::NO_MEMORY ());

  this->admin_properties().populate (properties);

  return properties._retn ();
}

CosNotifyChannelAdmin::AdminIDSeq * TAO_Notify_EventChannel::get_all_consumeradmins ( void   )  [protected]

Definition at line 391 of file EventChannel.cpp.

{
  TAO_Notify_ConsumerAdmin_Seq_Worker seq_worker;

  return seq_worker.create (this->ca_container());
}

CosNotifyChannelAdmin::AdminIDSeq * TAO_Notify_EventChannel::get_all_supplieradmins ( void   )  [protected]

Definition at line 399 of file EventChannel.cpp.

{
  TAO_Notify_SupplierAdmin_Seq_Worker seq_worker;

  return seq_worker.create (this->sa_container());
}

CosNotifyChannelAdmin::ConsumerAdmin_ptr TAO_Notify_EventChannel::get_consumeradmin ( CosNotifyChannelAdmin::AdminID  id  )  [virtual]

This is public to allow TAO_MonitorConsumerAdmin access.

Definition at line 363 of file EventChannel.cpp.

{
  // because default admins are allocated on-demand, we need to be sure one exists for id 0
  if (id == 0)
    {
       return default_consumer_admin ();
    }

  TAO_Notify_ConsumerAdmin_Find_Worker find_worker;

  return find_worker.resolve (id, this->ca_container());
}

virtual TAO_Notify_Object::ID TAO_Notify_EventChannel::get_id ( void   )  const [inline, virtual]

Find the id associated with topology object.

A bit of a hack because id is unknown to Topology_Object the get_id returns the same thing as id -- we just need someone to find it for us.

Reimplemented from TAO_Notify::Topology_Object.

Definition at line 94 of file EventChannel.h.

{return id();}

CosNotification::QoSProperties * TAO_Notify_EventChannel::get_qos ( void   )  [protected]

Definition at line 267 of file EventChannel.cpp.

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

CosNotifyChannelAdmin::SupplierAdmin_ptr TAO_Notify_EventChannel::get_supplieradmin ( CosNotifyChannelAdmin::AdminID  id  )  [virtual]

This is public to allow TAO_MonitorSupplierAdmin access.

Definition at line 377 of file EventChannel.cpp.

{
  // because default admins are allocated on-demand, we need to be sure one exists for id 0
  if (id == 0)
    {
      return default_supplier_admin ();
    }

  TAO_Notify_SupplierAdmin_Find_Worker find_worker;

  return find_worker.resolve (id, this->sa_container());
}

void TAO_Notify_EventChannel::init ( TAO_Notify_EventChannelFactory ecf,
const CosNotification::QoSProperties initial_qos,
const CosNotification::AdminProperties initial_admin 
)

Init.

Definition at line 61 of file EventChannel.cpp.

{
  ACE_ASSERT (this->ca_container_.get() == 0);

  // this-> on the following line confuses VC6
  initialize (ecf);

  this->ecf_.reset (ecf);

  // Init ca_container_
  TAO_Notify_ConsumerAdmin_Container* ca_container = 0;
  ACE_NEW_THROW_EX (ca_container,
                    TAO_Notify_ConsumerAdmin_Container (),
                    CORBA::INTERNAL ());
  this->ca_container_.reset (ca_container);

  this->ca_container().init ();

  // Init ca_container_
  TAO_Notify_SupplierAdmin_Container* sa_container = 0;
  ACE_NEW_THROW_EX (sa_container,
                    TAO_Notify_SupplierAdmin_Container (),
                    CORBA::INTERNAL ());
  this->sa_container_.reset (sa_container);

  this->sa_container().init ();

  // Set the admin properties.
  TAO_Notify_AdminProperties* admin_properties = 0;
  ACE_NEW_THROW_EX (admin_properties,
                    TAO_Notify_AdminProperties (),
                    CORBA::NO_MEMORY ());
  this->set_admin_properties (admin_properties);

  // create the event manager. @@ use factory
  TAO_Notify_Event_Manager* event_manager = 0;
  ACE_NEW_THROW_EX (event_manager,
                    TAO_Notify_Event_Manager (),
                    CORBA::INTERNAL ());
  this->set_event_manager (event_manager);

  this->event_manager().init ();

  const CosNotification::QoSProperties &default_ec_qos =
    TAO_Notify_PROPERTIES::instance ()->default_event_channel_qos_properties ();

  this->set_qos (default_ec_qos);

  this->set_qos (initial_qos);

  this->set_admin (initial_admin);

  PortableServer::POA_var default_poa = 
    TAO_Notify_PROPERTIES::instance ()->default_poa ();

  this->default_filter_factory_ =
    TAO_Notify_PROPERTIES::instance()->builder()->build_filter_factory (
    default_poa.in(), this->default_filter_factory_servant_);

  // Note originally default admins were allocated here, bt this
  // caused problems attempting to save the topology changes before
  // the Event Channel was completely constructed and linked to the
  // ECF.  Lazy evaluation also avoids creating unneded admins.
}

void TAO_Notify_EventChannel::init ( TAO_Notify::Topology_Parent parent  ) 

Init (for reload).

Definition at line 130 of file EventChannel.cpp.

{
  ACE_ASSERT (this->ecf_.get() == 0);
  // this-> on the following line confuses VC6
  initialize (parent);

  this->ecf_.reset (dynamic_cast <TAO_Notify_EventChannelFactory*>(parent));
  ACE_ASSERT (this->ecf_.get() !=0);

  // Init ca_container_
  TAO_Notify_ConsumerAdmin_Container* ca_container = 0;
  ACE_NEW_THROW_EX (ca_container,
                    TAO_Notify_ConsumerAdmin_Container (),
                    CORBA::INTERNAL ());
  this->ca_container_.reset (ca_container);

  this->ca_container().init ();

  TAO_Notify_SupplierAdmin_Container* sa_container = 0;
  // Init ca_container_
  ACE_NEW_THROW_EX (sa_container,
                    TAO_Notify_SupplierAdmin_Container (),
                    CORBA::INTERNAL ());
  this->sa_container_.reset (sa_container);

  this->sa_container().init ();

  // Set the admin properties.
  TAO_Notify_AdminProperties* admin_properties = 0;
  ACE_NEW_THROW_EX (admin_properties,
                    TAO_Notify_AdminProperties (),
                    CORBA::NO_MEMORY ());
  this->set_admin_properties (admin_properties);

  // create the event manager. @@ use factory
  TAO_Notify_Event_Manager* event_manager = 0;
  ACE_NEW_THROW_EX (event_manager,
                    TAO_Notify_Event_Manager (),
                    CORBA::INTERNAL ());
  this->set_event_manager (event_manager);

  this->event_manager().init ();

  const CosNotification::QoSProperties &default_ec_qos =
    TAO_Notify_PROPERTIES::instance ()->default_event_channel_qos_properties ();

  this->set_qos (default_ec_qos);

  PortableServer::POA_var default_poa = TAO_Notify_PROPERTIES::instance ()->default_poa ();
  this->default_filter_factory_ =
    TAO_Notify_PROPERTIES::instance()->builder()->build_filter_factory (
    default_poa.in(), this->default_filter_factory_servant_);
}

void TAO_Notify_EventChannel::load_attrs ( const TAO_Notify::NVPList attrs  )  [virtual]

Definition at line 494 of file EventChannel.cpp.

{
  TAO_Notify_Object::load_attrs(attrs);
  attrs.load(this->admin_properties().max_global_queue_length());
  attrs.load(this->admin_properties().max_consumers());
  attrs.load(this->admin_properties().max_suppliers());
  attrs.load(this->admin_properties().reject_new_events());
  this->admin_properties().init();
}

TAO_Notify::Topology_Object * TAO_Notify_EventChannel::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::Topology_Object.

Definition at line 505 of file EventChannel.cpp.

{
  TAO_Notify::Topology_Object* result = this;
  if (type == "filter_factory")
  {
    return this->default_filter_factory_servant_;
  }
  else if (type == "consumer_admin")
  {
    if (DEBUG_LEVEL) 
      ACE_DEBUG ((LM_DEBUG,
                  ACE_TEXT ("(%P|%t) EventChannel reload consumer_admin %d\n")
                  , static_cast<int> (id)
                  ));

    // call special builder method to reload
    TAO_Notify_Builder* bld = TAO_Notify_PROPERTIES::instance()->builder();
    TAO_Notify_ConsumerAdmin * ca = bld->build_consumer_admin (
      this,
      id);
    ca->load_attrs (attrs);
    if (ca->is_default ())
      {
        CORBA::Object_var caob = this->poa()->servant_to_reference (ca);
        this->default_consumer_admin_ =
          CosNotifyChannelAdmin::ConsumerAdmin::_narrow (
          caob.in ());
      }
    result = ca;
  }
  else if (type == "supplier_admin")
  {
    if (DEBUG_LEVEL) 
      ACE_DEBUG ((LM_DEBUG,
                  ACE_TEXT ("(%P|%t) EventChannel reload supplier_admin %d\n")
                  , static_cast<int> (id)
                  ));
    TAO_Notify_Builder* bld = TAO_Notify_PROPERTIES::instance()->builder();

    TAO_Notify_SupplierAdmin * sa = bld->build_supplier_admin (
      this,
      id);
    sa->load_attrs (attrs);
    if (sa->is_default ())
      {
        CORBA::Object_var saob = this->poa()->servant_to_reference (sa);
        this->default_supplier_admin_ =
          CosNotifyChannelAdmin::SupplierAdmin::_narrow (
          saob.in ());
      }
    result = sa;
  }
  return result;
}

CosNotifyChannelAdmin::EventChannelFactory_ptr TAO_Notify_EventChannel::MyFactory ( void   )  [protected]

=CosNotifyChannelAdminEventChannel methods

Definition at line 273 of file EventChannel.cpp.

{
  return this->ecf_->_this ();
}

CosNotifyChannelAdmin::ConsumerAdmin_ptr TAO_Notify_EventChannel::new_for_consumers ( CosNotifyChannelAdmin::InterFilterGroupOperator  op,
CosNotifyChannelAdmin::AdminID_out  id 
) [protected]

Definition at line 343 of file EventChannel.cpp.

{
  ::CosNotifyChannelAdmin::ConsumerAdmin_var ca =
    TAO_Notify_PROPERTIES::instance()->builder()->build_consumer_admin (this, op, id);
  this->self_change ();
  return ca._retn ();
}

CosNotifyChannelAdmin::SupplierAdmin_ptr TAO_Notify_EventChannel::new_for_suppliers ( CosNotifyChannelAdmin::InterFilterGroupOperator  op,
CosNotifyChannelAdmin::AdminID_out  id 
) [protected]

Definition at line 353 of file EventChannel.cpp.

{
  ::CosNotifyChannelAdmin::SupplierAdmin_var sa =
    TAO_Notify_PROPERTIES::instance()->builder()->build_supplier_admin (this, op, id);
  this->self_change ();
  return sa._retn ();
}

void TAO_Notify_EventChannel::reconnect ( void   )  [virtual]

Re-establish connections that we had before a shutdown.

After a topology restore, this method is called so we can reconnect to any external objects with whom we were interacting. We should call the reconnect() method on all of our children to give them the chance to do the same.

Reimplemented from TAO_Notify::Topology_Savable.

Definition at line 599 of file EventChannel.cpp.

void TAO_Notify_EventChannel::release ( void   )  [private, virtual]

Definition at line 198 of file EventChannel.cpp.

{
  delete this;
  //@@ inform factory
}

void TAO_Notify_EventChannel::remove ( TAO_Notify_ConsumerAdmin consumer_admin  ) 

Remove ConsumerAdmin from its container.

Definition at line 249 of file EventChannel.cpp.

{
  this->ca_container().remove (consumer_admin);
}

void TAO_Notify_EventChannel::remove ( TAO_Notify_SupplierAdmin supplier_admin  ) 

Remove SupplierAdmin from its container.

Definition at line 255 of file EventChannel.cpp.

{
  this->sa_container().remove (supplier_admin);
}

TAO_Notify_EventChannel::TAO_Notify_SupplierAdmin_Container & TAO_Notify_EventChannel::sa_container (  )  [private]

Definition at line 616 of file EventChannel.cpp.

{
  ACE_ASSERT( this->sa_container_.get() != 0 );
  return *sa_container_;
}

void TAO_Notify_EventChannel::save_attrs ( TAO_Notify::NVPList attrs  )  [private, virtual]

Definition at line 484 of file EventChannel.cpp.

{
  TAO_Notify_Object::save_attrs(attrs);
  add_attr(attrs, this->admin_properties().max_global_queue_length());
  add_attr(attrs, this->admin_properties().max_consumers());
  add_attr(attrs, this->admin_properties().max_suppliers());
  add_attr(attrs, this->admin_properties().reject_new_events());
}

void TAO_Notify_EventChannel::save_persistent ( TAO_Notify::Topology_Saver saver  )  [virtual]

Save our state to a Topology_Saver.

Use the methods of a Topology_Saver to store all information we want persisted. This function is called by our parent, which gives us a saver to use. In turn, we must call this function on all of our children. The implementation should look like: bool change = this->self_changed_; this->self_changed_ = false; this->children_changed_ = false; if (is_persistent ()) { bool want_all_children = saver.begin_object( this->id(), type, attrs, change); for all children { if (want_all_children || child.is_changed()) { child.save_persistent(saver); } } for all deleted children { saver.delete_child(child_type, child_id); } saver.end_object(this->id(), type); )

Implements TAO_Notify::Topology_Savable.

Definition at line 446 of file EventChannel.cpp.

{
  bool changed = this->self_changed_;
  this->self_changed_ = false;
  this->children_changed_ = false;

  if (is_persistent ())
  {
    TAO_Notify::NVPList attrs;
    this->save_attrs(attrs);

    bool want_all_children = saver.begin_object(
      this->id(), "channel", attrs, changed);
  
    this->default_filter_factory_servant_->save_persistent (saver);

    TAO_Notify::Save_Persist_Worker<TAO_Notify_ConsumerAdmin> ca_wrk(saver, want_all_children);

    this->ca_container().collection()->for_each(&ca_wrk);

    TAO_Notify::Save_Persist_Worker<TAO_Notify_SupplierAdmin> sa_wrk(saver, want_all_children);
    this->sa_container().collection()->for_each(&sa_wrk);

    saver.end_object(this->id(), "channel");
  }
}

void TAO_Notify_EventChannel::set_admin ( const CosNotification::AdminProperties admin  )  [protected, virtual]

Definition at line 407 of file EventChannel.cpp.

{
  this->admin_properties().init (admin);
}

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

Definition at line 261 of file EventChannel.cpp.

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

int TAO_Notify_EventChannel::shutdown ( void   )  [virtual]

Shutdown.

Definition at line 211 of file EventChannel.cpp.

{
  int sd_ret = TAO_Notify_Object::shutdown ();

  if (sd_ret == 1)
    return 1;

  this->ca_container().shutdown ();

  this->sa_container().shutdown ();

  this->event_manager().shutdown ();

  return 0;
}

void TAO_Notify_EventChannel::validate (  )  [virtual]

Definition at line 624 of file EventChannel.cpp.

void TAO_Notify_EventChannel::validate_qos ( const CosNotification::QoSProperties required_qos,
CosNotification::NamedPropertyRangeSeq_out  available_qos 
) [protected, virtual]

Definition at line 439 of file EventChannel.cpp.

{
  throw CORBA::NO_IMPLEMENT ();
}


Friends And Related Function Documentation

friend class TAO_Notify_Builder [friend]

Definition at line 54 of file EventChannel.h.


Member Data Documentation

ConsumerAdmin Container.

Definition at line 180 of file EventChannel.h.

Definition at line 131 of file EventChannel.h.

CosNotifyChannelAdmin::ConsumerAdmin_var TAO_Notify_EventChannel::default_consumer_admin_ [private]

Default Consumer Admin.

Definition at line 134 of file EventChannel.h.

CosNotifyFilter::FilterFactory_var TAO_Notify_EventChannel::default_filter_factory_ [private]

The default filter factory.

Definition at line 186 of file EventChannel.h.

Definition at line 187 of file EventChannel.h.

CosNotifyChannelAdmin::SupplierAdmin_var TAO_Notify_EventChannel::default_supplier_admin_ [private]

Default Supplier Admin.

Definition at line 137 of file EventChannel.h.

= Data Members The parent object.

Definition at line 129 of file EventChannel.h.

SupplierAdmin Container.

Definition at line 183 of file EventChannel.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines