00001 #ifndef RECONNECTION_CALLBACK_H 00002 #define RECONNECTION_CALLBACK_H 00003 00004 #include <orbsvcs/CosNotificationC.h> 00005 #include <orbsvcs/Notify/MonitorControlExt/NotifyMonitoringExtC.h> 00006 00007 #include <acsncS.h> 00008 00009 #include "acsncHelper.h" 00010 00011 namespace nc{ 00012 00013 class Helper; 00014 00015 class ReconnectionCallback: virtual public POA_acsnc::OSReconnectionCallback 00016 { 00017 public: 00018 ReconnectionCallback(nc::Helper *sub); 00019 ~ReconnectionCallback(); 00020 bool is_alive(); 00021 void reconnect(::CORBA::Object_ptr new_connection); 00022 void init(CORBA::ORB_ptr orb, 00023 NotifyMonitoringExt::EventChannelFactory_ptr ecf); 00024 void disconnect(); 00025 00026 private: 00027 NotifyMonitoringExt::EventChannelFactory_ptr ecf_; 00028 nc::Helper *sub_; 00029 int callback_id_; 00030 bool id_is_valid_; 00031 PortableServer::POA_var root_poa_; 00032 PortableServer::ObjectId_var callback_obj_id_; 00033 00034 protected: 00035 maci::ContainerServices *services_; 00036 00037 friend class Consumer; 00038 }; 00039 }; 00040 #endif