• 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 2009/09/24 23:08:03 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:
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   protected:
00189     virtual ~Supplier();
00190     
00199     void
00200     populateHeader(CosNotification::StructuredEvent &event)
00201         ;
00202 
00213     virtual void
00214     populateHeader(const CORBA::Any &any)
00215         ;
00216 
00226     void 
00227     setEventType(const char *);
00228 
00229 
00230 
00240     void
00241     createSupplier()
00242         ;
00243     
00255     void 
00256     destroyNotificationChannel()
00257         ;
00258 
00268     void
00269     init(CORBA::ORB_ptr orb)
00270         ;
00271 
00272 
00273     
00278     CosNotifyChannelAdmin::SupplierAdmin_var SupplierAdmin_m;
00279     
00283     CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxyConsumer_m;
00284 
00288     CosNotifyComm::StructuredPushSupplier_var reference_m;
00289 
00290     
00291 
00297     acscomponent::ACSComponentImpl* component_mp;
00298 
00302     char* typeName_mp;
00303 
00307     unsigned long long count_m;
00308     Logging::RepeatGuardLogger<Logging::BaseLog> guardbl;
00313     CosNotification::StructuredEvent event_m;
00314     
00315   private:
00316     
00317 
00321     void operator=(const Supplier&);
00322 
00326     Supplier(const Supplier&);
00327 
00328     CosNotifyChannelAdmin::AdminID adminid;
00329     CosNotifyChannelAdmin::ProxyID proxyConsumerID;
00330 
00331     CircularQueue eventBuff;
00332 
00333 };
00334  }; 
00335 #endif
00336 

Generated on Thu Jul 8 2010 19:47:46 for ACS-9.0 C++ API by  doxygen 1.7.0