org.apache.synapse.aspects.statistics
Class StatisticsReporter

java.lang.Object
  extended by org.apache.synapse.aspects.statistics.StatisticsReporter

public class StatisticsReporter
extends Object

A utility to report statistics at various check points in the message flow TODO - This class should be removed after a flow based statistics collection is done.


Constructor Summary
StatisticsReporter()
           
 
Method Summary
static void endReportForAllOnRequestProcessed(MessageContext synCtx)
          Ends statistics reporting for any component after the request processed.
static void reportFaultForAll(MessageContext synCtx, ErrorLog errorLog)
          Reporting a fault for any component when a response for a request is received.
static void reportForAllOnOutFlowEnd(MessageContext synCtx)
          Reports statistics on the end of the out flow
static void reportForAllOnResponseReceived(MessageContext synCtx)
          Collects statistics for any component when a response for a request is received.
static void reportForAllOnResponseSent(MessageContext synCtx)
          Reports statistics for any component on the response message is sent Any component means that this statistics log (check point) is valid for sequence, endpoint, and proxy.
static void reportForComponent(MessageContext synCtx, StatisticsConfigurable configurable, ComponentType componentType)
          Collects statistics for the given component.This is the starting point of collecting stats for a particular component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticsReporter

public StatisticsReporter()
Method Detail

reportForComponent

public static void reportForComponent(MessageContext synCtx,
                                      StatisticsConfigurable configurable,
                                      ComponentType componentType)
Collects statistics for the given component.This is the starting point of collecting stats for a particular component

Parameters:
synCtx - the current message being passed through the synapse
configurable - a component that can be configured it's audit
componentType - the type of the component which needs to collect statistics

reportForAllOnResponseReceived

public static void reportForAllOnResponseReceived(MessageContext synCtx)
Collects statistics for any component when a response for a request is received. Any component means that this statistics log (check point) is valid for sequence, endpoint, and proxy.

Parameters:
synCtx - the current message being passed through the synapse

reportFaultForAll

public static void reportFaultForAll(MessageContext synCtx,
                                     ErrorLog errorLog)
Reporting a fault for any component when a response for a request is received. Any component means that this statistics log (check point) is valid for sequence, endpoint, and proxy.

Parameters:
synCtx - synCtx Current Message through synapse
errorLog - the received error information

reportForAllOnResponseSent

public static void reportForAllOnResponseSent(MessageContext synCtx)
Reports statistics for any component on the response message is sent Any component means that this statistics log (check point) is valid for sequence, endpoint, and proxy.

Parameters:
synCtx - MessageContext instance

endReportForAllOnRequestProcessed

public static void endReportForAllOnRequestProcessed(MessageContext synCtx)
Ends statistics reporting for any component after the request processed. Any component means that this statistics log (check point) is valid for sequence, endpoint, and proxy. Only if the message is out-only, the stats are reported

Parameters:
synCtx - MessageContext instance

reportForAllOnOutFlowEnd

public static void reportForAllOnOutFlowEnd(MessageContext synCtx)
Reports statistics on the end of the out flow

Parameters:
synCtx - MessageContext instance


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.