TAO_Notify_StructuredProxyPushConsumer Class Reference

CosNotifyChannelAdmin::StructuredProxyPushConsumer implementation. More...

#include <StructuredProxyPushConsumer.h>

Inheritance diagram for TAO_Notify_StructuredProxyPushConsumer:

Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_StructuredProxyPushConsumer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Notify_StructuredProxyPushConsumer (void)
 Constructor.
virtual ~TAO_Notify_StructuredProxyPushConsumer ()
 Destructor.
virtual void load_attrs (const TAO_Notify::NVPList &attrs)

Protected Member Functions

virtual CosNotifyChannelAdmin::ProxyType MyType (void)
virtual void connect_structured_push_supplier (CosNotifyComm::StructuredPushSupplier_ptr push_supplier)
virtual void push_structured_event (const CosNotification::StructuredEvent &notification)
virtual void disconnect_structured_push_consumer ()
virtual const char * get_proxy_type_name (void) const

Private Types

typedef TAO_Notify_ProxyConsumer_T<
POA_CosNotifyChannelAdmin::StructuredProxyPushConsumer > 
SuperClass

Private Member Functions

virtual void release (void)
 Release.

Friends

class TAO_Notify_Builder

Detailed Description

CosNotifyChannelAdmin::StructuredProxyPushConsumer implementation.

Definition at line 40 of file StructuredProxyPushConsumer.h.


Member Typedef Documentation

typedef TAO_Notify_ProxyConsumer_T<POA_CosNotifyChannelAdmin::StructuredProxyPushConsumer> TAO_Notify_StructuredProxyPushConsumer::SuperClass [private]

Definition at line 43 of file StructuredProxyPushConsumer.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Notify_StructuredProxyPushConsumer::TAO_Notify_StructuredProxyPushConsumer ( void   ) 

Constructor.

Definition at line 17 of file StructuredProxyPushConsumer.cpp.

00018 {
00019 }

TAO_Notify_StructuredProxyPushConsumer::~TAO_Notify_StructuredProxyPushConsumer (  )  [virtual]

Destructor.

Definition at line 21 of file StructuredProxyPushConsumer.cpp.

00022 {
00023 }


Member Function Documentation

void TAO_Notify_StructuredProxyPushConsumer::connect_structured_push_supplier ( CosNotifyComm::StructuredPushSupplier_ptr  push_supplier  )  [protected, virtual]

Definition at line 39 of file StructuredProxyPushConsumer.cpp.

References ACE_NEW_THROW_EX, TAO_Notify_ProxyConsumer::connect(), TAO_Notify::Topology_Object::self_change(), and TAO_Notify_ProxyConsumer::supplier().

Referenced by load_attrs().

00040 {
00041   // Convert Supplier to Base Type
00042   TAO_Notify_StructuredPushSupplier * supplier;
00043   ACE_NEW_THROW_EX (supplier,
00044                     TAO_Notify_StructuredPushSupplier (this),
00045                     CORBA::NO_MEMORY ());
00046 
00047   supplier->init (push_supplier);
00048   this->connect (supplier);
00049   this->self_change ();
00050 }

void TAO_Notify_StructuredProxyPushConsumer::disconnect_structured_push_consumer (  )  [protected, virtual]

Definition at line 70 of file StructuredProxyPushConsumer.cpp.

References TAO_Notify_ProxyConsumer::destroy(), and TAO_Notify::Topology_Object::send_deletion_change().

00071 {
00072   TAO_Notify_StructuredProxyPushConsumer::Ptr guard( this );
00073   this->destroy ();
00074   this->send_deletion_change ();
00075 }

const char * TAO_Notify_StructuredProxyPushConsumer::get_proxy_type_name ( void   )  const [protected, virtual]

Implements TAO_Notify_Proxy.

Definition at line 78 of file StructuredProxyPushConsumer.cpp.

00079 {
00080   return "structured_proxy_push_consumer";
00081 }

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

Load our attributes. Each derived type should call the superclass load first before loading its own attributes.

Reimplemented from TAO_Notify_Object.

Definition at line 84 of file StructuredProxyPushConsumer.cpp.

References ACE_String_Base< CHAR >::c_str(), connect_structured_push_supplier(), TAO_Notify_Properties::instance(), ACE_String_Base< CHAR >::length(), TAO_Notify::NVPList::load(), TAO_Notify_Object::load_attrs(), TAO_Notify_Properties::orb(), and TAO_Notify_Proxy::updates_off_.

00085 {
00086   SuperClass::load_attrs(attrs);
00087   ACE_CString ior;
00088   if (attrs.load("PeerIOR", ior))
00089   {
00090     CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb();
00091     try
00092     {
00093       CosNotifyComm::StructuredPushSupplier_var ps = CosNotifyComm::StructuredPushSupplier::_nil();
00094       if ( ior.length() > 0 )
00095       {
00096         CORBA::Object_var obj = orb->string_to_object(ior.c_str());
00097         ps = CosNotifyComm::StructuredPushSupplier::_unchecked_narrow(obj.in());
00098       }
00099       // minor hack: suppress generating subscription updates during reload.
00100       bool save_updates = this->updates_off_;
00101       this->updates_off_ = true;
00102       this->connect_structured_push_supplier(ps.in());
00103       this->updates_off_ = save_updates;
00104     }
00105     catch (const CORBA::Exception&)
00106     {
00107       // if we can't reconnect to peer, tough...
00108     }
00109   }
00110 }

CosNotifyChannelAdmin::ProxyType TAO_Notify_StructuredProxyPushConsumer::MyType ( void   )  [protected, virtual]

Definition at line 33 of file StructuredProxyPushConsumer.cpp.

References CosNotifyChannelAdmin::PUSH_STRUCTURED.

00034 {
00035   return CosNotifyChannelAdmin::PUSH_STRUCTURED;
00036 }

void TAO_Notify_StructuredProxyPushConsumer::push_structured_event ( const CosNotification::StructuredEvent notification  )  [protected, virtual]

Definition at line 53 of file StructuredProxyPushConsumer.cpp.

References TAO_Notify_Object::admin_properties(), TAO_Notify_ProxyConsumer::push_i(), and TAO_Notify_AdminProperties::queue_full().

00054 {
00055   // Check if we should proceed at all.
00056   if (this->admin_properties().reject_new_events () == 1
00057       && this->admin_properties().queue_full ())
00058     throw CORBA::IMP_LIMIT ();
00059 
00060   if (this->is_connected () == 0)
00061     {
00062       throw CosEventComm::Disconnected ();
00063     }
00064 
00065   TAO_Notify_StructuredEvent_No_Copy event (notification);
00066   this->push_i (&event);
00067 }

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

Release.

Implements TAO_Notify_Refcountable.

Definition at line 26 of file StructuredProxyPushConsumer.cpp.

00027 {
00028   delete this;
00029   //@@ inform factory
00030 }


Friends And Related Function Documentation

friend class TAO_Notify_Builder [friend]

Reimplemented from TAO_Notify_Object.

Definition at line 44 of file StructuredProxyPushConsumer.h.


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