YAMI4 C++
activity_statistics_monitor.h
1 // Copyright Maciej Sobczak 2008-2019.
2 // This file is part of YAMI4.
3 //
4 // YAMI4 is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // YAMI4 is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with YAMI4. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef YAMICPP_ACTIVITY_STATISTICS_MONITOR_H_INCLUDED
18 #define YAMICPP_ACTIVITY_STATISTICS_MONITOR_H_INCLUDED
19 
20 #include "event_callback.h"
21 #include <yami4-core/dll.h>
22 
23 namespace yami
24 {
25 
26 class incoming_message;
27 class parameters;
28 
29 namespace details
30 {
31 class activity_statistics_monitor_impl;
32 } // namespace details
33 
41 {
42 public:
43 
45  virtual ~activity_statistics_monitor();
46 
55  void get(parameters & params, bool reset_counters = false);
56 
63  void operator()(incoming_message & msg);
64 
65 private:
66 
67  virtual void agent_created();
68  virtual void agent_closed();
69  virtual void listener_added(const char * target);
70  virtual void listener_removed(const char * target);
71  virtual void incoming_connection_open(const char * target);
72  virtual void outgoing_connection_open(const char * target);
73  virtual void connection_closed(const char * target);
74  virtual void connection_error(const char * target);
75  virtual void object_registered(const char * name);
76  virtual void object_unregistered(const char * name);
77  virtual void message_sent(const char * target, std::size_t size);
78  virtual void message_received(const char * target, std::size_t size);
79 
80  details::activity_statistics_monitor_impl * pimpl_;
81 };
82 
83 } // namespace yami
84 
85 #endif // YAMICPP_ACTIVITY_STATISTICS_MONITOR_H_INCLUDED
Incoming message.
Definition: incoming_message.h:48
Event notification callback interface.
Definition: event_callback.h:37
Connection was closed.
Definition: connection_event.h:28
Collection of message parameters.
Definition: parameters.h:71
Namespace devoted to everything related to YAMI4.
Definition: activity_statistics_monitor.cpp:27
Simple activity statistics monitor.
Definition: activity_statistics_monitor.h:40