Package com.microstrategy.web.app
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 interfaceStatsHandlerSupport.DataRequest statistics.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringHDR_BYTES_RECVThe name of the HTTP Header that indicates the total number of bytes received between IServer and Web.static java.lang.StringHDR_BYTES_SENTThe name of the HTTP Header that indicates the total number of bytes sent between IServer and Web.static java.lang.StringHDR_POLLING_XMLAPI_CALLSThe name of the HTTP Header that indicates the number of polling XML API calls.static java.lang.StringHDR_TOTAL_ISERVERThe name of the HTTP Header that indicates the Total IServer time.static java.lang.StringHDR_TOTAL_XMLAPI_CALLSThe name of the HTTP Header that indicates the total number of XML API Calls made.static java.lang.StringHDR_TRANSThe name of the HTTP Header that indicates the Web transmission time.static java.lang.StringHDR_WEBAPPThe name of the HTTP Header that indicates the Web Application time.static intLOG_MODE_ACTIVEstatistics mode indicating that the logging should be done to a file and the browser In this mode all the Web API calls are logged atLevel.FINElevel This file has all the necessary information to get performance statisticsstatic intLOG_MODE_FILEstatistics mode indicating that the logging should be done to a file In this mode all the Web API calls are logged atLevel.FINElevel This file has all the necessary information to get performance statisticsstatic intLOG_MODE_OFFThis mode turns off all statistics gatheringstatic intLOG_MODE_PASSIVEThis is currently not supportedstatic intLOG_MODE_SCREENstatistics mode indicating that the logging should be done to the browser Statistics are gathered while the request is being processed in memory.static intLOG_MODE_SNAPSHOTCollates statistics for a given user request then turns itself off.static intSTAT_BYTES_RECVThe bitmap value that indicates that the number of bytes received should be serialized.static intSTAT_BYTES_SENTThe bitmap value that indicates that the number of bytes sent should be serialized.static intSTAT_POLLING_XMLAPI_CALLSThe bitmap value that indicates that the number of polling XML API calls should be serialized.static intSTAT_TOTAL_ISERVERThe bitmap value that indicates that the Total IServer time should be serialized.static intSTAT_TOTAL_XMLAPI_CALLSThe bitmap value that indicates that the Total number of XML API calls should be serialized.static intSTAT_TRANSThe bitmap value that indicates that the Web transmission time should be serialized.static intSTAT_WEBAPPThe bitmap value that indicates that the Web Application time should be serialized.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clears out collected statistics.StatsHandlerSupport.DataendRequest(java.lang.String sessionID)This is used to mark the end of statistics collectionStatsHandlerSupport.DataendRequest(java.lang.String sessionID, java.io.Writer out)This is used to mark the end of statistics collection.StatsHandlerSupport.DataindicateEndOfApp(java.lang.String sessionID)Indicate the end of the Application Level request.booleanisDisabled()Whether Web Statistics are disabled or not.voidsaveStatsToHeaders(int statCode, ContainerServices cntrSvcs)Save a collection of statistics to HTTP headers.voidsetLogFileName(java.lang.String path)sets the physical location of the log filevoidsetMode(int logMode)Method used to set the log mode.voidstartRequest(java.lang.String sessionID, RequestKeys keys)Method used to indicate to the handler that statistics gathering should start at this pointvoidstartRequest(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.
-
-
-
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 atLevel.FINElevel 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 atLevel.FINElevel This file has all the necessary information to get performance statistics- See Also:
- Constant Field Values
-
STAT_TOTAL_ISERVER
static final int STAT_TOTAL_ISERVER
The bitmap value that indicates that the Total IServer time should be serialized. SeesaveStatsToHeaders(int, ContainerServices)- 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 identifierkeys- 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 identifierrequestKeys- the RequestKeys collection from the applicationstartMillis- 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 invokeindicateEndOfApp(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 identifierout- a writer where the statistics information will be flushed to in the case that the logging mode is set toLOG_MODE_SCREEN
-
setMode
void setMode(int logMode)
Method used to set the log mode. The possible values are defined- Parameters:
logMode- -- one of the following constantsLOG_MODE_FILELOG_MODE_SCREENLOG_MODE_OFFLOG_MODE_ACTIVE
-
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 toLOG_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- AContainerServicesinstance 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. UnlikeendRequest(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.
-
-