• 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.67 2011/11/17 23:31:54 javarias 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:
00070     Supplier(const char* channelName, 
00071              acscomponent::ACSComponentImpl* component,
00072                  const char* acsNCDomainName = 0);
00073 
00084     Supplier(const char* channelName, 
00085              CORBA::ORB_ptr orb_mp, 
00086              acscomponent::ACSComponentImpl* component,
00087                  const char* acsNCDomainName = 0);
00088     
00112     Supplier(const char* channelName, 
00113              int argc, 
00114              char *argv[],
00115              acscomponent::ACSComponentImpl* component,
00116                  const char* acsNCDomainName = 0);
00117 
00125     virtual void 
00126     disconnect();
00127 
00143     void 
00144     publishEvent(const CosNotification::StructuredEvent &event)
00145         ;
00146 
00160     virtual void 
00161     publishEvent(const CORBA::Any &eventData)
00162         ;
00163 
00173     virtual void 
00174     disconnect_structured_push_supplier();
00175     
00189     virtual void 
00190     subscription_change(const CosNotification::EventTypeSeq &eventsAdded,
00191                         const CosNotification::EventTypeSeq &eventsRemoved);
00192 
00197     void reconnect(::NotifyMonitoringExt::EventChannelFactory *ecf);
00198 
00199     void setAntennaName(std::string antennaName);
00200 
00201   protected:
00205     virtual ~Supplier();
00206     
00215     void
00216     populateHeader(CosNotification::StructuredEvent &event)
00217         ;
00218 
00229     virtual void
00230     populateHeader(const CORBA::Any &any)
00231         ;
00232 
00242     void 
00243     setEventType(const char *);
00244 
00245 
00246 
00256     void
00257     createSupplier()
00258         ;
00259     
00271     void 
00272     destroyNotificationChannel()
00273         ;
00274 
00284     void
00285     init(CORBA::ORB_ptr orb)
00286         ;
00287 
00288 
00289     
00294     CosNotifyChannelAdmin::SupplierAdmin_var SupplierAdmin_m;
00295     
00299     CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxyConsumer_m;
00300 
00304     CosNotifyComm::StructuredPushSupplier_var reference_m;
00305 
00306     
00307 
00313     acscomponent::ACSComponentImpl* component_mp;
00314 
00318     char* typeName_mp;
00319 
00323     unsigned long long count_m;
00324     Logging::RepeatGuardLogger<Logging::BaseLog> guardbl;
00329     CosNotification::StructuredEvent event_m;
00330     
00331     std::string antennaName;
00332 
00333   private:
00334     
00335 
00339     void operator=(const Supplier&);
00340 
00344     Supplier(const Supplier&);
00345 
00346     CosNotifyChannelAdmin::AdminID adminid;
00347     CosNotifyChannelAdmin::ProxyID proxyConsumerID;
00348 
00349     CircularQueue eventBuff;
00350 
00351 };
00352  }; 
00353 #endif
00354 

Generated on Mon May 4 2015 08:27:41 for ACS-2015.4 C++ API by  doxygen 1.7.0