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

loggingService.h

Go to the documentation of this file.
00001 #ifndef loggingService_H
00002 #define loggingService_H
00003 
00004 /*******************************************************************************
00005 *    ALMA - Atacama Large Millimiter Array
00006 *    (c) European Southern Observatory, 2002
00007 *    Copyright by ESO (in the framework of the ALMA collaboration)
00008 *    and Cosylab 2002, All rights reserved
00009 *
00010 *    This library is free software; you can redistribute it and/or
00011 *    modify it under the terms of the GNU Lesser General Public
00012 *    License as published by the Free Software Foundation; either
00013 *    version 2.1 of the License, or (at your option) any later version.
00014 *
00015 *    This library is distributed in the hope that it will be useful,
00016 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 *    Lesser General Public License for more details.
00019 *
00020 *    You should have received a copy of the GNU Lesser General Public
00021 *    License along with this library; if not, write to the Free Software
00022 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00023 *
00024 * "@(#) $Id: loggingService.h,v 1.43 2007/05/28 06:23:39 cparedes Exp $"
00025 *
00026 * who       when        what
00027 * --------  ----------  ----------------------------------------------
00028 * bjeram    2003-03-10  DsLogAdmin::LogFullAction -> DsLogAdmin::LogFullActionType, LogMgr_i -> TAO_LogMgr_i, BasicLog_i to TAO_BasicLog_i (TAO x.3)
00029 * msekoran  2001-07-08  added implementation of sending logs to Notify Service
00030 * msekoran  2001-06-17  created
00031 */
00032 
00033 #ifndef __cplusplus
00034 #error This is a C++ include file and cannot be used from plain C
00035 #endif
00036 
00037 #include <acsutil.h>
00038 #include <orbsvcs/CosNamingC.h>
00039 #include <orbsvcs/DsLogAdminC.h>
00040 #include <orbsvcs/CosNotifyChannelAdminS.h>
00041 
00042 #include "loggingACSStructuredPushSupplier.h"
00043 #include "loggingACSLogFactory_i.h"
00044 #define LOG_BIN_TYPE 0
00045 #define LOG_XML_TYPE 1
00046 
00050 class LoggingService
00051 {   
00052   public:
00053     
00054     //--Initialization and termination methods-----------------
00058     LoggingService();
00059     
00063     virtual ~LoggingService();
00064     
00068     bool 
00069     isInitialized() { return m_isInitialized; }
00070     
00075     int 
00076     parse_args (int argc, char *argv []);
00077 
00081     void 
00082     startup (int argc, char *argv[]);
00083 
00088     int 
00089     run ();
00090 
00094     void shutdown (); 
00095     
00096 
00097   protected:
00098 
00102     void 
00103     init_ORB (int& argc, char *argv []);
00104 
00108     void 
00109     resolve_naming_service ();
00110     
00114     void resolve_notify_factory ();
00115 
00119     void create_EC ();
00120 
00124     void 
00125     create_supplieradmin();
00126 
00130     void 
00131     create_suppliers(); 
00132 
00136     void 
00137     create_basic_log_factory();
00138 
00142     void 
00143     create_basic_log();
00144 
00145 
00146     //--Notify Service data members-------------------------------
00147 
00149     CosNotifyChannelAdmin::EventChannelFactory_var m_notify_factory;
00150     
00152     CosNotifyChannelAdmin::EventChannel_var m_logging_ec;
00153 
00155     CosNotification::QoSProperties m_initial_qos;
00156 
00158     CosNotification::AdminProperties m_initial_admin;
00159 
00161     CosNotifyChannelAdmin::InterFilterGroupOperator m_ifgop;
00162 
00164     CosNotifyChannelAdmin::SupplierAdmin_var m_logging_supplier_admin;
00165 
00167     ACSStructuredPushSupplier* m_logging_supplier;
00168     
00169 
00170     //--Logging Service data members----------------------------
00171 
00173     const char* m_basic_log_factory_name;
00174 
00176     const char* m_basic_log_name;
00177     
00179     ACSLogFactory_i m_basic_log_factory;
00180 
00182     DsLogAdmin::BasicLog_var m_basic_log;
00183 
00184 
00185     //--Common data members-------------------------------------
00186 
00187     bool m_logBin;
00188 
00190     bool m_isInitialized;
00191 
00193     CORBA::ORB_var m_orb;
00194 
00196     PortableServer::POA_var m_poa;
00197 
00199   CosNaming::NamingContext_var m_naming_context;
00200 };
00201 #endif /* loggingService_H */
00202 
00203 
00204 
00205 // ************************************************************************
00206 //
00207 // REVISION HISTORY:
00208 //
00209 // $Log: loggingService.h,v $
00210 // Revision 1.43  2007/05/28 06:23:39  cparedes
00211 // Adding the new alternate method to log binaries
00212 //
00213 // Revision 1.42.14.2  2007/04/03 07:46:03  cparedes
00214 // Changing from ACS_LOG_TYPE to ACS_LOG_BIN
00215 //
00216 // Revision 1.42.14.1  2007/03/05 06:16:24  cparedes
00217 // First attempt, work well with old things, but seg fault with the new things. To debug
00218 //
00219 // Revision 1.42  2006/01/28 00:03:51  dfugate
00220 // The LoggingChannel is now created using the LoggingNotifyEventChannelFactory instead of NotifyEventChannelFactory.
00221 //
00222 // Revision 1.41  2005/09/12 19:02:15  dfugate
00223 // Stripped out all code dealing with the archiving channel EXCEPT that used to
00224 // create the notification channel.
00225 //
00226 // Revision 1.40  2005/09/12 17:57:06  dfugate
00227 // Converted plain C++ comments to Doxygen-style.
00228 // Split loggingService.h into four headers (three new) as it's an ALMA C++
00229 // coding violation to have more than one class declaration per header.
00230 //
00231 // Revision 1.39  2005/09/09 21:33:45  dfugate
00232 // Decoupled a generic event supplier from loggingService.cpp.
00233 //
00234 // Revision 1.38  2003/10/24 19:27:07  dfugate
00235 // Fixed a few serious bugs and now use native exceptions.
00236 //
00237 // Revision 1.37  2003/10/23 07:39:09  acaproni
00238 // True native exception handling. No more extra parameters
00239 //
00240 // Revision 1.36  2003/07/28 09:46:57  bjeram
00241 // modification for native exception
00242 //
00243 // Revision 1.35  2003/03/14 10:24:37  rgeorgie
00244 // LGPL
00245 //
00246 // Revision 1.34  2003/03/10 14:29:29  bjeram
00247 // changes according to the changes in TAO x.3
00248 //
00249 // Revision 1.33  2002/09/23 12:43:04  vltsccm
00250 // msekoran: loggingXMLParser fixed, memory leak removed and tat test added.
00251 // ************************************************************************
00252 
00253 
00254 
00255 

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