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

basencSupplier.h

Go to the documentation of this file.
00001 #ifndef basenc_supplier_H
00002 #define basenc_supplier_H
00003 /*******************************************************************************
00004  *    ALMA - Atacama Large Millimiter Array
00005  *    (c) European Southern Observatory, 2002
00006  *    Copyright by ESO (in the framework of the ALMA collaboration)
00007  *    and Cosylab 2002, All rights reserved
00008  *
00009  *    This library is free software; you can redistribute it and/or
00010  *    modify it under the terms of the GNU Lesser General Public
00011  *    License as published by the Free Software Foundation; either
00012  *    version 2.1 of the License, or (at your option) any later version.
00013  *
00014  *    This library is distributed in the hope that it will be useful,
00015  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  *    Lesser General Public License for more details.
00018  *
00019  *    You should have received a copy of the GNU Lesser General Public
00020  *    License along with this library; if not, write to the Free Software
00021  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00022  *
00023  * "@(#) $Id: basencSupplier.h,v 1.8 2012/11/28 11:11:49 acaproni Exp $"
00024  *
00025  * who       when        what
00026  * --------  ----------  ----------------------------------------------
00027  * dfugate  2005-11-10  created
00028  */
00029 
00030 #ifndef __cplusplus
00031 #error This is a C++ include file and cannot be used from plain C
00032 #endif
00033 
00038 #include <orbsvcs/CosNotifyChannelAdminS.h>
00039 #include <orbsvcs/CosNotifyCommC.h>
00040 #include <orbsvcs/CosNamingC.h>
00041 #include <acsncS.h>
00042 #include "RepeatGuardLogger.h"
00043 #include "basencHelper.h"
00044 
00048 class BaseSupplier : public POA_acsnc::OSPushSupplier,
00049                      public PortableServer::RefCountServantBase,
00050                      public BaseHelper
00051 {
00052   public:
00053     
00061     BaseSupplier(const char* channelName, const char* acsNCDomainName = 0);
00062     
00066     virtual void 
00067     disconnect();
00068     
00073     void
00074     init(CosNaming::NamingContext_ptr nc_p);
00075     
00079     void done();
00080 
00081     //--CORBA methods defined here-----------------------------------------
00087     virtual void 
00088     subscription_change(const CosNotification::EventTypeSeq &added,
00089                         const CosNotification::EventTypeSeq &removed);
00090     
00095     virtual void 
00096     disconnect_structured_push_supplier();
00097     //----------------------------------------------------------------------
00098   protected:
00102     virtual ~BaseSupplier();
00103     
00115     void 
00116     publishEvent(const CosNotification::StructuredEvent& event);
00117 
00122     virtual void
00123     populateHeader(CosNotification::StructuredEvent& event);
00124     
00125     
00130     virtual const char*
00131     getEventType() = 0;
00132 
00137     virtual const char*
00138     getEventName()
00139         { return ""; }
00140 
00141 
00142     
00143     
00144 
00145     
00146 
00154     virtual acsnc::OSPushSupplier_ptr
00155     getCORBARef();
00156 
00157     
00158 
00159   private:
00165     void 
00166     connect();
00167     
00172     CosNotifyChannelAdmin::SupplierAdmin_var supplierAdmin_m;
00173 
00177     CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxyConsumer_m;
00178     
00182     CosNotifyChannelAdmin::ProxyID proxyConsumerID_m;
00183 
00184     
00185 
00189      CosNotifyChannelAdmin::AdminID adminID_m;
00190 
00194     acsnc::OSPushSupplier_var corbaRef_m;
00195 
00200     Logging::RepeatGuardLogger<Logging::BaseLog> guardbl_m;
00201 };
00202 
00203 #endif

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