TAO_Notify_SequenceProxyPushConsumer Class Reference

#include <SequenceProxyPushConsumer.h>

Inheritance diagram for TAO_Notify_SequenceProxyPushConsumer:

Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_SequenceProxyPushConsumer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Notify_SequenceProxyPushConsumer (void)
 Constuctor.

virtual ~TAO_Notify_SequenceProxyPushConsumer ()
 Destructor.

virtual const char * get_proxy_type_name (void) const
virtual void load_attrs (const TAO_Notify::NVPList &attrs)

Protected Member Functions

virtual CosNotifyChannelAdmin::ProxyType MyType () throw ( CORBA::SystemException )
 = Protected Methods

virtual void connect_sequence_push_supplier (CosNotifyComm::SequencePushSupplier_ptr push_supplier) throw ( CORBA::SystemException, CosEventChannelAdmin::AlreadyConnected )
virtual void push_structured_events (const CosNotification::EventBatch &notifications) throw ( CORBA::SystemException, CosEventComm::Disconnected )
virtual void disconnect_sequence_push_consumer () throw ( CORBA::SystemException )

Protected Attributes

TAO_Notify_Property_Time pacing_interval_
 = Data Members


Private Types

typedef TAO_Notify_ProxyConsumer_T<
POA_CosNotifyChannelAdmin::SequenceProxyPushConsumer > 
SuperClass

Private Member Functions

virtual void release (void)
 TAO_Notify_Destroy_Callback methods.


Friends

class TAO_Notify_Builder

Member Typedef Documentation

typedef TAO_Notify_ProxyConsumer_T<POA_CosNotifyChannelAdmin::SequenceProxyPushConsumer> TAO_Notify_SequenceProxyPushConsumer::SuperClass [private]
 

Definition at line 43 of file SequenceProxyPushConsumer.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Notify_SequenceProxyPushConsumer::TAO_Notify_SequenceProxyPushConsumer void   ) 
 

Constuctor.

Definition at line 15 of file SequenceProxyPushConsumer.cpp.

00016 :pacing_interval_ (CosNotification::PacingInterval)
00017 {
00018 }

TAO_Notify_SequenceProxyPushConsumer::~TAO_Notify_SequenceProxyPushConsumer  )  [virtual]
 

Destructor.

Definition at line 20 of file SequenceProxyPushConsumer.cpp.

00021 {
00022 }


Member Function Documentation

void TAO_Notify_SequenceProxyPushConsumer::connect_sequence_push_supplier CosNotifyComm::SequencePushSupplier_ptr  push_supplier  )  throw ( CORBA::SystemException, CosEventChannelAdmin::AlreadyConnected ) [protected, virtual]
 

Definition at line 41 of file SequenceProxyPushConsumer.cpp.

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

Referenced by load_attrs().

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

void TAO_Notify_SequenceProxyPushConsumer::disconnect_sequence_push_consumer  )  throw ( CORBA::SystemException ) [protected, virtual]
 

Definition at line 88 of file SequenceProxyPushConsumer.cpp.

References ACE_CHECK, and ACE_ENV_SINGLE_ARG_PARAMETER.

00092 {
00093   TAO_Notify_SequenceProxyPushConsumer::Ptr guard( this );
00094   this->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
00095   ACE_CHECK;
00096   this->self_change (ACE_ENV_SINGLE_ARG_PARAMETER);
00097 }

const char * TAO_Notify_SequenceProxyPushConsumer::get_proxy_type_name void   )  const [virtual]
 

Implements TAO_Notify_Proxy.

Definition at line 100 of file SequenceProxyPushConsumer.cpp.

00101 {
00102   return "sequence_proxy_push_consumer";
00103 }

void TAO_Notify_SequenceProxyPushConsumer::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 106 of file SequenceProxyPushConsumer.cpp.

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

00107 {
00108   SuperClass::load_attrs(attrs);
00109   ACE_CString ior;
00110   if (attrs.load("PeerIOR", ior))
00111   {
00112     CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb();
00113     ACE_DECLARE_NEW_CORBA_ENV;
00114     ACE_TRY
00115     {
00116       CosNotifyComm::SequencePushSupplier_var ps = CosNotifyComm::SequencePushSupplier::_nil();
00117       if ( ior.length() > 0 )
00118       {
00119         CORBA::Object_var obj = orb->string_to_object(ior.c_str() ACE_ENV_ARG_PARAMETER);
00120         ACE_TRY_CHECK;
00121         ps = CosNotifyComm::SequencePushSupplier::_unchecked_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
00122         ACE_TRY_CHECK;
00123       }
00124       // minor hack: suppress generating subscription updates during reload.
00125       bool save_updates = this->updates_off_;
00126       this->updates_off_ = true;
00127       this->connect_sequence_push_supplier(ps.in() ACE_ENV_ARG_PARAMETER);
00128       ACE_TRY_CHECK;
00129       this->updates_off_ = save_updates;
00130     }
00131     ACE_CATCHANY
00132     {
00133       ACE_ASSERT(0);
00134     }
00135     ACE_ENDTRY;
00136   }
00137 }

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

= Protected Methods

Definition at line 32 of file SequenceProxyPushConsumer.cpp.

00036 {
00037   return CosNotifyChannelAdmin::PUSH_SEQUENCE;
00038 }

void TAO_Notify_SequenceProxyPushConsumer::push_structured_events const CosNotification::EventBatch notifications  )  throw ( CORBA::SystemException, CosEventComm::Disconnected ) [protected, virtual]
 

Definition at line 62 of file SequenceProxyPushConsumer.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_THROW, and CosNotification::EventBatch.

00067 {
00068   // Check if we should proceed at all.
00069   if (this->admin_properties().reject_new_events () == 1 && this->admin_properties().queue_full ())
00070     ACE_THROW (CORBA::IMP_LIMIT ());
00071 
00072   if (this->is_connected () == 0)
00073     {
00074       ACE_THROW (CosEventComm::Disconnected ());
00075     }
00076 
00077   for (CORBA::ULong i = 0; i < event_batch.length (); ++i)
00078     {
00079       const CosNotification::StructuredEvent& notification = event_batch[i];
00080 
00081       TAO_Notify_StructuredEvent_No_Copy event (notification);
00082       this->push_i (&event ACE_ENV_ARG_PARAMETER);
00083       ACE_CHECK;
00084     }
00085 }

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

TAO_Notify_Destroy_Callback methods.

Implements TAO_Notify_Refcountable.

Definition at line 25 of file SequenceProxyPushConsumer.cpp.

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


Friends And Related Function Documentation

friend class TAO_Notify_Builder [friend]
 

Reimplemented from TAO_Notify_Object.

Definition at line 44 of file SequenceProxyPushConsumer.h.


Member Data Documentation

TAO_Notify_Property_Time TAO_Notify_SequenceProxyPushConsumer::pacing_interval_ [protected]
 

= Data Members

Definition at line 58 of file SequenceProxyPushConsumer.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:33:11 2006 for TAO_CosNotification by doxygen 1.3.6