TAO_Notify_StructuredProxyPushSupplier Class Reference

Implements the CosNotifyChannelAdmin::StructuredProxyPushSupplier methods. More...

#include <StructuredProxyPushSupplier.h>

Inheritance diagram for TAO_Notify_StructuredProxyPushSupplier:

Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_StructuredProxyPushSupplier:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Notify_StructuredProxyPushSupplier (void)
 Constructor.
virtual ~TAO_Notify_StructuredProxyPushSupplier ()
 Destructor.
virtual void load_attrs (const TAO_Notify::NVPList &attrs)
virtual CosNotifyChannelAdmin::ProxyType MyType (void)
 = Servant methods
virtual void connect_structured_push_consumer (CosNotifyComm::StructuredPushConsumer_ptr push_consumer)
virtual void disconnect_structured_push_supplier ()
virtual const char * get_proxy_type_name (void) const

Private Types

typedef TAO_Notify_ProxySupplier_T<
POA_Event_Forwarder::StructuredProxyPushSupplier > 
SuperClass

Private Member Functions

virtual void release (void)
 Release.

Friends

class TAO_Notify_Builder

Detailed Description

Implements the CosNotifyChannelAdmin::StructuredProxyPushSupplier methods.

Definition at line 47 of file StructuredProxyPushSupplier.h.


Member Typedef Documentation

typedef TAO_Notify_ProxySupplier_T<POA_Event_Forwarder::StructuredProxyPushSupplier> TAO_Notify_StructuredProxyPushSupplier::SuperClass [private]

Definition at line 50 of file StructuredProxyPushSupplier.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Notify_StructuredProxyPushSupplier::TAO_Notify_StructuredProxyPushSupplier ( void   ) 

Constructor.

Definition at line 16 of file StructuredProxyPushSupplier.cpp.

00017 {
00018 }

TAO_Notify_StructuredProxyPushSupplier::~TAO_Notify_StructuredProxyPushSupplier (  )  [virtual]

Destructor.

Definition at line 20 of file StructuredProxyPushSupplier.cpp.

00021 {
00022 }


Member Function Documentation

void TAO_Notify_StructuredProxyPushSupplier::connect_structured_push_consumer ( CosNotifyComm::StructuredPushConsumer_ptr  push_consumer  )  [virtual]

Definition at line 38 of file StructuredProxyPushSupplier.cpp.

References ACE_NEW_THROW_EX, TAO_Notify_ProxySupplier::connect(), TAO_Notify_ProxySupplier::consumer(), and TAO_Notify::Topology_Object::self_change().

Referenced by load_attrs().

00039 {
00040   // Convert Consumer to Base Type
00041   TAO_Notify_StructuredPushConsumer* consumer;
00042   ACE_NEW_THROW_EX (consumer,
00043                     TAO_Notify_StructuredPushConsumer (this),
00044                     CORBA::NO_MEMORY ());
00045 
00046   consumer->init (push_consumer);
00047 
00048   this->connect (consumer);
00049   this->self_change ();
00050 }

void TAO_Notify_StructuredProxyPushSupplier::disconnect_structured_push_supplier (  )  [virtual]

Definition at line 53 of file StructuredProxyPushSupplier.cpp.

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

00055 {
00056   TAO_Notify_StructuredProxyPushSupplier::Ptr guard( this );
00057   this->destroy ();
00058   this->send_deletion_change ();
00059 }

const char * TAO_Notify_StructuredProxyPushSupplier::get_proxy_type_name ( void   )  const [virtual]

Implements TAO_Notify_Proxy.

Definition at line 62 of file StructuredProxyPushSupplier.cpp.

00063 {
00064   return "structured_proxy_push_supplier";
00065 }

void TAO_Notify_StructuredProxyPushSupplier::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 68 of file StructuredProxyPushSupplier.cpp.

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

00069 {
00070   SuperClass::load_attrs(attrs);
00071   ACE_CString ior;
00072   if (attrs.load("PeerIOR", ior))
00073   {
00074     CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb();
00075     try
00076     {
00077       CosNotifyComm::StructuredPushConsumer_var pc = CosNotifyComm::StructuredPushConsumer::_nil();
00078       if (ior.length() > 0)
00079       {
00080         CORBA::Object_var obj = orb->string_to_object(ior.c_str());
00081         pc = CosNotifyComm::StructuredPushConsumer::_unchecked_narrow(obj.in());
00082       }
00083       this->connect_structured_push_consumer(pc.in());
00084     }
00085     catch (const CORBA::Exception&)
00086     {
00087       // if we can't connect... tough
00088     }
00089   }
00090 }

CosNotifyChannelAdmin::ProxyType TAO_Notify_StructuredProxyPushSupplier::MyType ( void   )  [virtual]

= Servant methods

Definition at line 32 of file StructuredProxyPushSupplier.cpp.

References CosNotifyChannelAdmin::PUSH_STRUCTURED.

00033 {
00034   return CosNotifyChannelAdmin::PUSH_STRUCTURED;
00035 }

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

Release.

Implements TAO_Notify_Refcountable.

Definition at line 25 of file StructuredProxyPushSupplier.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 51 of file StructuredProxyPushSupplier.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