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)
 Constuctor.

virtual ~TAO_Notify_StructuredProxyPushConsumer ()
 Destructor.

virtual void load_attrs (const TAO_Notify::NVPList &attrs)

Protected Member Functions

virtual CosNotifyChannelAdmin::ProxyType MyType () throw ( CORBA::SystemException )
virtual void connect_structured_push_supplier (CosNotifyComm::StructuredPushSupplier_ptr push_supplier) throw ( CORBA::SystemException, CosEventChannelAdmin::AlreadyConnected )
virtual void push_structured_event (const CosNotification::StructuredEvent &notification) throw ( CORBA::SystemException, CosEventComm::Disconnected )
virtual void disconnect_structured_push_consumer () throw ( CORBA::SystemException )
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   ) 
 

Constuctor.

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  )  throw ( CORBA::SystemException, CosEventChannelAdmin::AlreadyConnected ) [protected, virtual]
 

Definition at line 42 of file StructuredProxyPushConsumer.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_NEW_THROW_EX, and TAO_Notify_StructuredPushSupplier::init().

Referenced by load_attrs().

00047 {
00048   // Convert Supplier to Base Type
00049   TAO_Notify_StructuredPushSupplier * supplier;
00050   ACE_NEW_THROW_EX (supplier,
00051                     TAO_Notify_StructuredPushSupplier (this),
00052                     CORBA::NO_MEMORY ());
00053 
00054   supplier->init (push_supplier ACE_ENV_ARG_PARAMETER);
00055   ACE_CHECK;
00056   this->connect (supplier ACE_ENV_ARG_PARAMETER);
00057   ACE_CHECK;
00058   this->self_change (ACE_ENV_SINGLE_ARG_PARAMETER);
00059 }

void TAO_Notify_StructuredProxyPushConsumer::disconnect_structured_push_consumer  )  throw ( CORBA::SystemException ) [protected, virtual]
 

Definition at line 83 of file StructuredProxyPushConsumer.cpp.

References ACE_CHECK, and ACE_ENV_SINGLE_ARG_PARAMETER.

00087 {
00088   TAO_Notify_StructuredProxyPushConsumer::Ptr guard( this );
00089   this->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
00090   ACE_CHECK;
00091   this->self_change (ACE_ENV_SINGLE_ARG_PARAMETER);
00092 }

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

Implements TAO_Notify_Proxy.

Definition at line 95 of file StructuredProxyPushConsumer.cpp.

00096 {
00097   return "structured_proxy_push_consumer";
00098 }

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 101 of file StructuredProxyPushConsumer.cpp.

References ACE_CATCHANY, ACE_CString, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_TRY, ACE_TRY_CHECK, connect_structured_push_supplier(), TAO_Singleton< TYPE, ACE_LOCK >::instance(), and TAO_Notify::NVPList::load().

00102 {
00103   SuperClass::load_attrs(attrs);
00104   ACE_CString ior;
00105   if (attrs.load("PeerIOR", ior))
00106   {
00107     CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb();
00108     ACE_DECLARE_NEW_CORBA_ENV;
00109     ACE_TRY
00110     {
00111       ACE_TRY_CHECK;
00112       CosNotifyComm::StructuredPushSupplier_var ps = CosNotifyComm::StructuredPushSupplier::_nil();
00113       if ( ior.length() > 0 )
00114       {
00115         CORBA::Object_var obj = orb->string_to_object(ior.c_str() ACE_ENV_ARG_PARAMETER);
00116         ACE_TRY_CHECK;
00117         ps = CosNotifyComm::StructuredPushSupplier::_unchecked_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
00118         ACE_TRY_CHECK;
00119       }
00120       // minor hack: suppress generating subscription updates during reload.
00121       bool save_updates = this->updates_off_;
00122       this->updates_off_ = true;
00123       this->connect_structured_push_supplier(ps.in() ACE_ENV_ARG_PARAMETER);
00124       ACE_TRY_CHECK;
00125       this->updates_off_ = save_updates;
00126     }
00127     ACE_CATCHANY
00128     {
00129       // if we can't reconnect to peer, tough...
00130     }
00131     ACE_ENDTRY;
00132   }
00133 }

CosNotifyChannelAdmin::ProxyType TAO_Notify_StructuredProxyPushConsumer::MyType  )  throw ( CORBA::SystemException ) [protected, virtual]
 

Definition at line 33 of file StructuredProxyPushConsumer.cpp.

00037 {
00038   return CosNotifyChannelAdmin::PUSH_STRUCTURED;
00039 }

void TAO_Notify_StructuredProxyPushConsumer::push_structured_event const CosNotification::StructuredEvent notification  )  throw ( CORBA::SystemException, CosEventComm::Disconnected ) [protected, virtual]
 

Definition at line 62 of file StructuredProxyPushConsumer.cpp.

References ACE_ENV_ARG_PARAMETER, and ACE_THROW.

00067 {
00068   // Check if we should proceed at all.
00069   if (this->admin_properties().reject_new_events () == 1
00070       && this->admin_properties().queue_full ())
00071     ACE_THROW (CORBA::IMP_LIMIT ());
00072 
00073   if (this->is_connected () == 0)
00074     {
00075       ACE_THROW (CosEventComm::Disconnected ());
00076     }
00077 
00078   TAO_Notify_StructuredEvent_No_Copy event (notification);
00079   this->push_i (&event ACE_ENV_ARG_PARAMETER);
00080 }

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 Thu Nov 9 13:33:24 2006 for TAO_CosNotification by doxygen 1.3.6