[reSIProcate] Handling StatisticsMessage

Justin Matthews jmatthewsr at yahoo.com
Wed Oct 11 13:13:55 CDT 2006


Ok, let me propose the following solution:

Add a callback handler to the SipStack->StatisticsManager. The default
behavior can be disabled/enabled using the return value from the handler
(similar to ExternalLogger).

Comments?

Thanks,

-Justin

/** Interface functor for external stats handling. */
class ExternalStatsHandler
{
   public:
      virtual ~ExternalStatsHandler()=0;
      /** return true to also do default handling, false to supress default
handling. */
      virtual bool operator()(StatisticsMessage &statsMessage) = 0;
};

void 
StatisticsManager::poll()
{
...

	bool postToStack = true;
	StatisticsMessage msg(appStats);

	if( mHandler )
	{
		postToStack = mHandler(msg);
	}

	if( postToStack )
	{
		mStack.post(msg);
	}
}
-----Original Message-----
From: resiprocate-devel-bounces at list.sipfoundry.org
[mailto:resiprocate-devel-bounces at list.sipfoundry.org] On Behalf Of Justin
Matthews
Sent: Wednesday, October 11, 2006 8:53 AM
To: resiprocate-devel at list.sipfoundry.org
Subject: [reSIProcate] Handling StatisticsMessage

Hello,

Is it possible to handle the StatisticsMessage generated by the stack?
Right now it looks like the message is being sent to the TuSelector by the
stack and then just output to the logger.  I know there was some earlier
discussion on this but it looks like the code was never implemented or the
ideas changed.

Would a StatisticsMessage handler be a good solution, or maybe a mechanism
to allow the StatisticsMessage to find a TU (DUM) to post the message to?

Thanks,

-Justin

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel at list.sipfoundry.org
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel




More information about the resiprocate-devel mailing list