• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

acsncSupplier.h

Go to the documentation of this file.
00001 #ifndef SUPPLIER_H
00002 #define SUPPLIER_H
00003 
00004 /* @(#) $Id: acsncSupplier.h,v 1.66.26.1 2011/11/24 14:48:02 rtobar Exp $
00005  *
00006  *    Supplier Abstract base class for notification channel push structured event
00007  *    supplier.
00008  *    ALMA - Atacama Large Millimiter Array
00009  *    (c) Associated Universities Inc., 2002 
00010  *    (c) European Southern Observatory, 2002
00011  *    Copyright by ESO (in the framework of the ALMA collaboration)
00012  *    and Cosylab 2002, All rights reserved
00013  *
00014  *    This library is free software; you can redistribute it and/or
00015  *    modify it under the terms of the GNU Lesser General Public
00016  *    License as published by the Free Software Foundation; either
00017  *    version 2.1 of the License, or (at your option) any later version.
00018  *
00019  *    This library is distributed in the hope that it will be useful,
00020  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022  *    Lesser General Public License for more details.
00023  *
00024  *    You should have received a copy of the GNU Lesser General Public
00025  *    License along with this library; if not, write to the Free Software
00026  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00027  */
00028 
00033 #include "acsncHelper.h"
00034 #include <acscomponentImpl.h>
00035 #include "RepeatGuardLogger.h"
00036 #include "acsncCircularQueue.h"
00037 
00038 namespace nc {
00055 class Supplier : 
00056     protected Helper, 
00057     public POA_CosNotifyComm::StructuredPushSupplier,
00058     protected virtual PortableServer::RefCountServantBase
00059 {
00060   public:
00068     Supplier(const char* channelName, 
00069              acscomponent::ACSComponentImpl* component);
00070 
00079     Supplier(const char* channelName, 
00080              CORBA::ORB_ptr orb_mp, 
00081              acscomponent::ACSComponentImpl* component);
00082     
00104     Supplier(const char* channelName, 
00105              int argc, 
00106              char *argv[],
00107              acscomponent::ACSComponentImpl* component);
00108 
00116     virtual void 
00117     disconnect();
00118 
00133     void 
00134     publishEvent(const CosNotification::StructuredEvent &event)
00135         ;
00136 
00146     virtual void 
00147     publishEvent(const CORBA::Any &eventData)
00148         ;
00149 
00159     virtual void 
00160     disconnect_structured_push_supplier();
00161     
00175     virtual void 
00176     subscription_change(const CosNotification::EventTypeSeq &eventsAdded,
00177                         const CosNotification::EventTypeSeq &eventsRemoved);
00178 
00183     void reconnect(::NotifyMonitoringExt::EventChannelFactory *ecf);
00184 
00185     void setAntennaName(std::string antennaName);
00186 
00187   protected:
00191     virtual ~Supplier();
00192     
00201     void
00202     populateHeader(CosNotification::StructuredEvent &event)
00203         ;
00204 
00215     virtual void
00216     populateHeader(const CORBA::Any &any)
00217         ;
00218 
00228     void 
00229     setEventType(const char *);
00230 
00231 
00232 
00242     void
00243     createSupplier()
00244         ;
00245     
00257     void 
00258     destroyNotificationChannel()
00259         ;
00260 
00270     void
00271     init(CORBA::ORB_ptr orb)
00272         ;
00273 
00274 
00275     
00280     CosNotifyChannelAdmin::SupplierAdmin_var SupplierAdmin_m;
00281     
00285     CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxyConsumer_m;
00286 
00290     CosNotifyComm::StructuredPushSupplier_var reference_m;
00291 
00292     
00293 
00299     acscomponent::ACSComponentImpl* component_mp;
00300 
00304     char* typeName_mp;
00305 
00309     unsigned long long count_m;
00310     Logging::RepeatGuardLogger<Logging::BaseLog> guardbl;
00315     CosNotification::StructuredEvent event_m;
00316     
00317     std::string antennaName;
00318 
00319   private:
00320     
00321 
00325     void operator=(const Supplier&);
00326 
00330     Supplier(const Supplier&);
00331 
00332     CosNotifyChannelAdmin::AdminID adminid;
00333     CosNotifyChannelAdmin::ProxyID proxyConsumerID;
00334 
00335     CircularQueue eventBuff;
00336 
00337 };
00338  }; 
00339 #endif
00340 

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0