|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcorelib.services.web.statistics.StatisticManager
public class StatisticManager
This class manage requests to the Ellipse statistic service. This class implements a singleton design patterns: only one instance of this service can be launched per web application.
This service used to the web application deployement descriptor configuration (WEB-INF/web.xml).
You can see below the init parameters related to the Ellipse Statitics service and there default values. If you use
this configuration, you can invoke the service with this URL: http://localhost/applicationName/Stats.wp.
<context-param>
<param-name>STATISTICS_ENABLED</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>STATISTICS_FILENAME</param-name>
<param-value>corelib/services/web/statistics.log</param-value>
</context-param>
<context-param>
<param-name>STATISTICS_DURATION</param-name>
<param-value>365</param-value>
</context-param>
</context-param>
<context-param>
<param-name>STATISTICS_URL</param-name>
<param-value>Stats.wp</param-value>
</context-param>
| Field Summary | |
|---|---|
static StatisticManager |
manager
|
| Method Summary | |
|---|---|
void |
generateRequestedHtmlPage(java.lang.String requestedURI)
Ellipse statistics service can generate multiple activity diagrams and one full HTML report. |
static StatisticManager |
getInstance()
Retrieve the unique instance of the Ellipse statistics service. |
java.util.Collection<StatisticEntry> |
getStatisticEntries()
Returns the history of all known statistics. |
StatisticEntry |
getStatisticEntry(java.lang.String dateKey)
Retrieve (or create if not exists) the StatisticEntry instance associated to the specified date. |
int |
getStatisticsDuration()
Compute the time interval, expremied in days, between the first and the last acquired statistics. |
void |
logNewSession(javax.servlet.http.HttpServletRequest request)
Record the informations stored in the specifed request in a new StatisticEntry object. |
void |
saveDocument()
Write all browsing statistics in the associated file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static StatisticManager manager
| Method Detail |
|---|
public static StatisticManager getInstance()
public void logNewSession(javax.servlet.http.HttpServletRequest request)
request - The HTTP request associated to the new logged session .public int getStatisticsDuration()
public java.util.Collection<StatisticEntry> getStatisticEntries()
public StatisticEntry getStatisticEntry(java.lang.String dateKey)
dateKey - The key associated to the searched statistic.
public void generateRequestedHtmlPage(java.lang.String requestedURI)
Ellipse statistics service can generate multiple activity diagrams and one full HTML report.
All of these diagrams (and the HTML report) can be accessed with a unique URL (view STATISTICS_URL init parameter in the WEB-INF/web.file deployment descriptor).
But this URL can accept some parameters for qualify the requested element. This method verify URL parameters for dispatch handling to the good element.
The supported URL parameters are :
requestedURI - The requestedURI The URL used for produce statistics report
public void saveDocument()
throws java.io.IOException
java.io.IOException - Thrown if the associated file cannot be modified.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||