PushSupplier.cpp

Go to the documentation of this file.
00001 // $Id: PushSupplier.cpp 76626 2007-01-26 13:50:03Z elliott_c $
00002 
00003 #include "orbsvcs/Notify/Any/PushSupplier.h"
00004 
00005 ACE_RCSID (Notify, TAO_Notify_PushSupplier, "$Id: PushSupplier.cpp 76626 2007-01-26 13:50:03Z elliott_c $")
00006 #include "orbsvcs/Notify/Properties.h"
00007 
00008 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00009 
00010 TAO_Notify_PushSupplier::TAO_Notify_PushSupplier (TAO_Notify_ProxyConsumer* proxy)
00011   :TAO_Notify_Supplier (proxy)
00012 {
00013 }
00014 
00015 TAO_Notify_PushSupplier::~TAO_Notify_PushSupplier ()
00016 {
00017 }
00018 
00019 void
00020 TAO_Notify_PushSupplier::init (CosEventComm::PushSupplier_ptr push_supplier)
00021 {
00022   // TODO: verify single init call
00023   // push_supplier is optional
00024   this->push_supplier_ = CosEventComm::PushSupplier::_duplicate (push_supplier);
00025 
00026   try
00027     {
00028       this->subscribe_ = CosNotifyComm::NotifySubscribe::_narrow (push_supplier);
00029     }
00030   catch (const CORBA::Exception&)
00031     {
00032       // _narrow failed which probably means the interface is CosEventComm type.
00033     }
00034 }
00035 
00036 void
00037 TAO_Notify_PushSupplier::release (void)
00038 {
00039   delete this;
00040   //@@ inform factory
00041 }
00042 
00043 ACE_CString
00044 TAO_Notify_PushSupplier::get_ior (void) const
00045 {
00046   ACE_CString result;
00047   CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb();
00048   try
00049   {
00050     CORBA::String_var ior = orb->object_to_string(this->push_supplier_.in());
00051     result = static_cast<const char*> (ior.in ());
00052   }
00053   catch (const CORBA::Exception&)
00054   {
00055     result.fast_clear();
00056   }
00057   return result;
00058 }
00059 
00060 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:45:29 2010 for TAO_CosNotification by  doxygen 1.4.7