reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
StatisticsManager.hxx
Go to the documentation of this file.
1#ifndef RESIP_StatisticsManager_hxx
2#define RESIP_StatisticsManager_hxx
3
4#include "rutil/Timer.hxx"
5#include "rutil/Data.hxx"
8
9namespace resip
10{
11class SipStack;
12class SipMessage;
13class TransactionController;
14
21{
22 public:
23 // not implemented
35
36 StatisticsManager(SipStack& stack, unsigned long intervalSecs=60);
38
39 void process();
40 // not stricly thread-safe; needs to be called through the fifo somehow
41 void setInterval(unsigned long intvSecs);
42
49 {
50 mExternalHandler = handler;
51 }
52
53 private:
54 friend class TransactionState;
55 bool sent(SipMessage* msg);
56 bool retransmitted(MethodTypes type, bool request, unsigned int code);
57 bool received(SipMessage* msg);
58
59 void poll(); // force an update
60
61 SipStack& mStack;
62 uint64_t mInterval;
63 uint64_t mNextPoll;
64
65 ExternalStatsHandler *mExternalHandler;
66 //
67 // When statistics are published, a copy of values are made
68 // and copied into this member, and then reference to this is
69 // published thru both ExternalHandler and posted to stack as message.
70 // This payload is mutex protected.
72};
73
74}
75
76#endif
77
78/* ====================================================================
79 * The Vovida Software License, Version 1.0
80 *
81 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
82 *
83 * Redistribution and use in source and binary forms, with or without
84 * modification, are permitted provided that the following conditions
85 * are met:
86 *
87 * 1. Redistributions of source code must retain the above copyright
88 * notice, this list of conditions and the following disclaimer.
89 *
90 * 2. Redistributions in binary form must reproduce the above copyright
91 * notice, this list of conditions and the following disclaimer in
92 * the documentation and/or other materials provided with the
93 * distribution.
94 *
95 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
96 * and "Vovida Open Communication Application Library (VOCAL)" must
97 * not be used to endorse or promote products derived from this
98 * software without prior written permission. For written
99 * permission, please contact vocal@vovida.org.
100 *
101 * 4. Products derived from this software may not be called "VOCAL", nor
102 * may "VOCAL" appear in their name, without prior written
103 * permission of Vovida Networks, Inc.
104 *
105 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
106 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
107 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
108 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
109 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
110 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
111 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
112 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
113 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
114 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
115 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
116 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
117 * DAMAGE.
118 *
119 * ====================================================================
120 *
121 * This software consists of voluntary contributions made by Vovida
122 * Networks, Inc. and many individuals on behalf of Vovida Networks,
123 * Inc. For more information on Vovida Networks, Inc., please see
124 * <http://www.vovida.org/>.
125 *
126 */
Interface functor for external stats handling.
Represents a SIP message.
This is the primary point of interaction between the app-layer and the stack.
Definition SipStack.hxx:160
Keeps track of various statistics on the stack's operation, and periodically issues a StatisticsMessa...
void setInterval(unsigned long intvSecs)
void setExternalStatsHandler(ExternalStatsHandler *handler)
Allows the application to set the ExternalStatsHandler for this StatisticsManager.
dcm! – add UnusedChecking(_enum) below;
unsigned long long uint64_t
Definition Stun.hxx:39
void list()
Definition userAdmin.cxx:66