Re: [reSIProcate] Handling StatisticsMessage
Looks good to me! : )
-----Original Message-----
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Justin
Matthews
Sent: Wednesday, October 11, 2006 2:14 PM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [reSIProcate] Handling StatisticsMessage
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@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Justin
Matthews
Sent: Wednesday, October 11, 2006 8:53 AM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel