LogService
libdadi: utility tools for distributed applications
LogCentralTool_impl.hh
1 /****************************************************************************/
2 /* Defines an object implementing the interface LogCentralTool defined in */
3 /* the LogCentralTool.idl */
4 /* */
5 /* Author(s): */
6 /* - Georg Hoesch (hoesch@in.tum.de) */
7 /* - Cyrille Pontvieux (cyrille.pontvieux@edu.univ-fcomte.fr) */
8 /* */
9 /* This file is part of DIET . */
10 /* */
11 /* Copyright (C) 2000-2003 ENS Lyon, LIFC, INSA, INRIA and SysFera (2000) */
12 /* */
13 /* - Frederic.Desprez@ens-lyon.fr (Project Manager) */
14 /* - Eddy.Caron@ens-lyon.fr (Technical Manager) */
15 /* - Tech@sysfera.com (Maintainer and Technical Support) */
16 /* */
17 /* This software is a computer program whose purpose is to provide an */
18 /* distributed logging services. */
19 /* */
20 /* */
21 /* This software is governed by the CeCILL license under French law and */
22 /* abiding by the rules of distribution of free software. You can use, */
23 /* modify and/ or redistribute the software under the terms of the CeCILL */
24 /* license as circulated by CEA, CNRS and INRIA at the following URL */
25 /* "http://www.cecill.info". */
26 /* */
27 /* As a counterpart to the access to the source code and rights to copy, */
28 /* modify and redistribute granted by the license, users are provided */
29 /* only with a limited warranty and the software's author, the holder */
30 /* of the economic rights, and the successive licensors have only */
31 /* limited liability. */
32 /* */
33 /* In this respect, the user's attention is drawn to the risks */
34 /* associated with loading, using, modifying and/or developing or */
35 /* reproducing the software by the user in light of its specific status */
36 /* of free software, that may mean that it is complicated to */
37 /* manipulate, and that also therefore means that it is reserved for */
38 /* developers and experienced professionals having in-depth computer */
39 /* knowledge. Users are therefore encouraged to load and test the */
40 /* software's suitability as regards their requirements in conditions */
41 /* enabling the security of their systems and/or data to be ensured and, */
42 /* more generally, to use and operate it in the same conditions as */
43 /* regards security. */
44 /* */
45 /* The fact that you are presently reading this means that you have had */
46 /* knowledge of the CeCILL license and that you accept its terms. */
47 /* */
48 /****************************************************************************/
49 /* $Id$
50  * $Log$
51  * Revision 1.3 2010/12/03 12:40:27 kcoulomb
52  * MAJ log to use forwarders
53  *
54  * Revision 1.2 2010/11/10 02:27:44 kcoulomb
55  * Update the log to use the forwarder.
56  * Programm run without launching forwarders but fails with forwarder.
57  *
58  * Revision 1.1 2004/01/09 11:07:12 ghoesch
59  * Restructured the whole LogService source tree.
60  * Added autotools make process. Cleaned up code.
61  * Removed some testers. Ready to release.
62  *
63  ***************************************************************************/
64 
65 #ifndef _LOGCENTRALTOOL_IMPL_HH_
66 #define _LOGCENTRALTOOL_IMPL_HH_
67 
68 #include "ToolList.hh"
69 #include "ComponentList.hh"
70 #include "FilterManagerInterface.hh"
71 #include "StateManager.hh"
72 
73 #include "CorbaLogForwarder.hh"
74 
90  public PortableServer::RefCountServantBase {
91 public:
92  LogCentralTool_impl(ToolList* toolList,
93  ComponentList* compList,
94  FilterManagerInterface* filterMan,
95  StateManager* stateMan,
96  tag_list_t* allTags);
97 
99 
100  void
101  test();
102 
118  CORBA::Short
119  connectTool(char*& toolName, const char* msgReceiver);
120 
128  CORBA::Short
129  disconnectTool(const char* toolName);
130 
136  tag_list_t*
137  getDefinedTags();
138 
147 
157  CORBA::Short
158  addFilter(const char* toolName, const filter_t& filter);
159 
167  CORBA::Short
168  removeFilter(const char* toolName, const char* filterName);
169 
175  CORBA::Short
176  flushAllFilters(const char* toolName);
177 
178 private:
179  FilterManagerInterface* filterManager;
180  StateManager* stateManager;
181  ToolList* toolList;
182  ComponentList* componentList;
183  tag_list_t allTags;
184 
196  bool
197  getToolByName(const char* toolName, ToolList::ReadIterator* it);
198 
210  bool
211  getFilterByName(const char* filterName, FilterList::ReadIterator* it);
212 };
213 
214 
216  public PortableServer::RefCountServantBase {
217 public:
218 
220  const char* objName);
221 
223 
224  void
225  test();
226 
242  CORBA::Short
243  connectTool(char*& toolName,
244  const char* msgReceiver);
245 
253  CORBA::Short
254  disconnectTool(const char* toolName);
255 
261  tag_list_t*
262  getDefinedTags();
263 
272 
282  CORBA::Short
283  addFilter(const char* toolName, const filter_t& filter);
284 
292  CORBA::Short
293  removeFilter(const char* toolName, const char* filterName);
294 
300  CORBA::Short
301  flushAllFilters(const char* toolName);
302 
303 protected:
304  CorbaLogForwarder_ptr forwarder;
305  char* objName;
306 };
307 
308 
309 
310 
311 
312 
314  public PortableServer::RefCountServantBase {
315 public:
316 
317  ToolMsgReceiverFwdr_impl(CorbaLogForwarder_ptr fwdr, const char* objName);
318 
320 
321  void
322  sendMsg(const log_msg_buf_t& msgBuf);
323 
324 protected:
325  CorbaLogForwarder_ptr forwarder;
326  char* objName;
327 };
328 
329 #endif
Definition: LogToolFwdr.hh:663
Definition: FullLinkedList.hh:263
CORBA::Short removeFilter(const char *toolName, const char *filterName)
Definition: LogCentralTool_impl.hh:313
Definition: LogToolFwdr.hh:543
Definition: StateManager.hh:68
CORBA::Short disconnectTool(const char *toolName)
CORBA::Short flushAllFilters(const char *toolName)
component_list_t * getDefinedComponents()
Definition: LogTool.hh:405
Definition: LogCentralTool_impl.hh:215
Definition: LogTypes.hh:107
CORBA::Short connectTool(char *&toolName, const char *msgReceiver)
Definition: CorbaLogForwarder.hh:141
Definition: LogTypes.hh:221
Definition: FilterManagerInterface.hh:73
Definition: LogTool.hh:73
Definition: FullLinkedList.hh:88
tag_list_t * getDefinedTags()
CORBA::Short addFilter(const char *toolName, const filter_t &filter)
Definition: LogCentralTool_impl.hh:89
Definition: LogTypes.hh:335