Interface StatsHandlerSupport

  • All Known Implementing Classes:
    StatsHandler

    public interface StatsHandlerSupport
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  StatsHandlerSupport.Data
      Request statistics.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String HDR_BYTES_RECV
      The name of the HTTP Header that indicates the total number of bytes received between IServer and Web.
      static java.lang.String HDR_BYTES_SENT
      The name of the HTTP Header that indicates the total number of bytes sent between IServer and Web.
      static java.lang.String HDR_POLLING_XMLAPI_CALLS
      The name of the HTTP Header that indicates the number of polling XML API calls.
      static java.lang.String HDR_TOTAL_ISERVER
      The name of the HTTP Header that indicates the Total IServer time.
      static java.lang.String HDR_TOTAL_XMLAPI_CALLS
      The name of the HTTP Header that indicates the total number of XML API Calls made.
      static java.lang.String HDR_TRANS
      The name of the HTTP Header that indicates the Web transmission time.
      static java.lang.String HDR_WEBAPP
      The name of the HTTP Header that indicates the Web Application time.
      static int LOG_MODE_ACTIVE
      statistics mode indicating that the logging should be done to a file and the browser In this mode all the Web API calls are logged at Level.FINE level This file has all the necessary information to get performance statistics
      static int LOG_MODE_FILE
      statistics mode indicating that the logging should be done to a file In this mode all the Web API calls are logged at Level.FINE level This file has all the necessary information to get performance statistics
      static int LOG_MODE_OFF
      This mode turns off all statistics gathering
      static int LOG_MODE_PASSIVE
      This is currently not supported
      static int LOG_MODE_SCREEN
      statistics mode indicating that the logging should be done to the browser Statistics are gathered while the request is being processed in memory.
      static int LOG_MODE_SNAPSHOT
      Collates statistics for a given user request then turns itself off.
      static int STAT_BYTES_RECV
      The bitmap value that indicates that the number of bytes received should be serialized.
      static int STAT_BYTES_SENT
      The bitmap value that indicates that the number of bytes sent should be serialized.
      static int STAT_POLLING_XMLAPI_CALLS
      The bitmap value that indicates that the number of polling XML API calls should be serialized.
      static int STAT_TOTAL_ISERVER
      The bitmap value that indicates that the Total IServer time should be serialized.
      static int STAT_TOTAL_XMLAPI_CALLS
      The bitmap value that indicates that the Total number of XML API calls should be serialized.
      static int STAT_TRANS
      The bitmap value that indicates that the Web transmission time should be serialized.
      static int STAT_WEBAPP
      The bitmap value that indicates that the Web Application time should be serialized.
    • Field Detail

      • LOG_MODE_SCREEN

        static final int LOG_MODE_SCREEN
        statistics mode indicating that the logging should be done to the browser Statistics are gathered while the request is being processed in memory.
        See Also:
        Constant Field Values
      • LOG_MODE_FILE

        static final int LOG_MODE_FILE
        statistics mode indicating that the logging should be done to a file In this mode all the Web API calls are logged at Level.FINE level This file has all the necessary information to get performance statistics
        See Also:
        Constant Field Values
      • LOG_MODE_PASSIVE

        static final int LOG_MODE_PASSIVE
        This is currently not supported
        See Also:
        Constant Field Values
      • LOG_MODE_OFF

        static final int LOG_MODE_OFF
        This mode turns off all statistics gathering
        See Also:
        Constant Field Values
      • LOG_MODE_SNAPSHOT

        static final int LOG_MODE_SNAPSHOT
        Collates statistics for a given user request then turns itself off.
        See Also:
        Constant Field Values
      • LOG_MODE_ACTIVE

        static final int LOG_MODE_ACTIVE
        statistics mode indicating that the logging should be done to a file and the browser In this mode all the Web API calls are logged at Level.FINE level This file has all the necessary information to get performance statistics
        See Also:
        Constant Field Values
      • STAT_WEBAPP

        static final int STAT_WEBAPP
        The bitmap value that indicates that the Web Application time should be serialized.
        See Also:
        Constant Field Values
      • STAT_TOTAL_XMLAPI_CALLS

        static final int STAT_TOTAL_XMLAPI_CALLS
        The bitmap value that indicates that the Total number of XML API calls should be serialized.
        See Also:
        Constant Field Values
      • STAT_POLLING_XMLAPI_CALLS

        static final int STAT_POLLING_XMLAPI_CALLS
        The bitmap value that indicates that the number of polling XML API calls should be serialized.
        See Also:
        Constant Field Values
      • STAT_BYTES_SENT

        static final int STAT_BYTES_SENT
        The bitmap value that indicates that the number of bytes sent should be serialized.
        See Also:
        Constant Field Values
      • STAT_BYTES_RECV

        static final int STAT_BYTES_RECV
        The bitmap value that indicates that the number of bytes received should be serialized.
        See Also:
        Constant Field Values
      • STAT_TRANS

        static final int STAT_TRANS
        The bitmap value that indicates that the Web transmission time should be serialized.
        See Also:
        Constant Field Values
      • HDR_TOTAL_ISERVER

        static final java.lang.String HDR_TOTAL_ISERVER
        The name of the HTTP Header that indicates the Total IServer time.
        See Also:
        Constant Field Values
      • HDR_WEBAPP

        static final java.lang.String HDR_WEBAPP
        The name of the HTTP Header that indicates the Web Application time.
        See Also:
        Constant Field Values
      • HDR_TOTAL_XMLAPI_CALLS

        static final java.lang.String HDR_TOTAL_XMLAPI_CALLS
        The name of the HTTP Header that indicates the total number of XML API Calls made.
        See Also:
        Constant Field Values
      • HDR_POLLING_XMLAPI_CALLS

        static final java.lang.String HDR_POLLING_XMLAPI_CALLS
        The name of the HTTP Header that indicates the number of polling XML API calls.
        See Also:
        Constant Field Values
      • HDR_BYTES_SENT

        static final java.lang.String HDR_BYTES_SENT
        The name of the HTTP Header that indicates the total number of bytes sent between IServer and Web.
        See Also:
        Constant Field Values
      • HDR_BYTES_RECV

        static final java.lang.String HDR_BYTES_RECV
        The name of the HTTP Header that indicates the total number of bytes received between IServer and Web.
        See Also:
        Constant Field Values
      • HDR_TRANS

        static final java.lang.String HDR_TRANS
        The name of the HTTP Header that indicates the Web transmission time.
        See Also:
        Constant Field Values
    • Method Detail

      • startRequest

        void startRequest​(java.lang.String sessionID,
                          RequestKeys keys)
        Method used to indicate to the handler that statistics gathering should start at this point
        Parameters:
        sessionID - String with the value of the session identifier
        keys - the RequestKeys collection from the application
      • startRequest

        void startRequest​(java.lang.String sessionID,
                          RequestKeys requestKeys,
                          long startMillis)
        Method used to indicate to the handler that statistics gathering should start at the point specified by the startMillis parameter.
        Parameters:
        sessionID - String with the value of the session identifier
        requestKeys - the RequestKeys collection from the application
        startMillis - the time that Web statistics should use as the start time (expressed in milliseconds).
      • endRequest

        StatsHandlerSupport.Data endRequest​(java.lang.String sessionID)
        This is used to mark the end of statistics collection
        Parameters:
        sessionID - String with the value of the session identifier
      • endRequest

        StatsHandlerSupport.Data endRequest​(java.lang.String sessionID,
                                            java.io.Writer out)
        This is used to mark the end of statistics collection. Internally, this will invoke indicateEndOfApp(String), print out the statistics based on the mode, then finally clear out the existing state.
        Parameters:
        sessionID - String with the value of the session identifier
        out - a writer where the statistics information will be flushed to in the case that the logging mode is set to LOG_MODE_SCREEN
      • setLogFileName

        void setLogFileName​(java.lang.String path)
        sets the physical location of the log file
        Parameters:
        path - The physical location of the file to which all log messages would be written if the logging mode is set to LOG_MODE_FILE
      • saveStatsToHeaders

        void saveStatsToHeaders​(int statCode,
                                ContainerServices cntrSvcs)
        Save a collection of statistics to HTTP headers.
        Parameters:
        statCode - A bitmap of specific statistics that should be saved to HTTP Headers.
        cntrSvcs - A ContainerServices instance to use for creating HTTP Headers.
      • isDisabled

        boolean isDisabled()
        Whether Web Statistics are disabled or not.
        Returns:
        true if Web Statistics are disabled.
      • indicateEndOfApp

        StatsHandlerSupport.Data indicateEndOfApp​(java.lang.String sessionID)
        Indicate the end of the Application Level request. This is used to mark the end of statistics collection. Unlike endRequest(String), this method does not write any statistics to any output stream.
        Parameters:
        sessionID - String with the value of the session identifier
      • clear

        void clear()
        Clears out collected statistics.