| org.apache.jetspeed.statistics.PortalStatistics
All known Subclasses: org.apache.jetspeed.statistics.impl.PortalStatisticsImpl,
PortalStatistics | public interface PortalStatistics (Code) | | The PortletStatistics interface provides an API for logging portlet
statistics. Each log entry is formatted in the Apache Common Log Format (CLF)
. Each CLF log entry has the following form:
"%h %l %u %t \"%r\" %>s %b"
where:
- %h - remote host
- %l - remote log name
- %u - remote user
- %t - time in common log time format
- %r - first line of HTTP request
- %s - HTTP status code
- %b - number of bytes sent ("-" if no bytes sent).
Here's an example of a CLF log entry:
192.168.2.3 - johndoe [25/Oct/2005:11:44:40 PDT] "GET
/jetspeed/DatabaseBrowserTest HTTP/1.1" 200 -
The PortletStatistics interface overloads the %r field of the CLF format,
depending on the type of information being logged:
LOG TYPE FORMAT OF %r FIELD -------------- ----------------------------
Portlet access "PORTLET " Page access "PAGE
" User logout "LOGOUT"
author: David Sean Taylor author: Mark Orciuch author: Richard Klein version: $Id: $ |
Method Summary | |
public StatisticsQueryCriteria | createStatisticsQueryCriteria() | public void | forceFlush() | public DataSource | getDataSource() | public AggregateStatistics | getDefaultEmptyAggregateStatistics() Factory to create new, empty, aggregate statistics object. | public List | getListOfLoggedInUsers() | public int | getNumberOfCurrentUsers() | public int | getNumberOfLoggedInUsers() | public void | logPageAccess(RequestContext request, String statusCode, long msElapsedTime) Logs an access to a page. | public void | logPortletAccess(RequestContext request, String portlet, String statusCode, long msElapsedTime) Logs an access to a portlet. | public void | logUserLogin(RequestContext request, long msElapsedLoginTime) Logs a user logout event. | public void | logUserLogout(String ipAddress, String userName, long msSessionLength) Logs a user logout event. | public AggregateStatistics | queryStatistics(StatisticsQueryCriteria criteria) |
HTTP_INTERNAL_ERROR | final public static String HTTP_INTERNAL_ERROR(Code) | | |
HTTP_NOT_FOUND | final public static String HTTP_NOT_FOUND(Code) | | |
HTTP_UNAUTHORIZED | final public static String HTTP_UNAUTHORIZED(Code) | | |
QUERY_TYPE_PAGE | final public static String QUERY_TYPE_PAGE(Code) | | |
QUERY_TYPE_PORTLET | final public static String QUERY_TYPE_PORTLET(Code) | | |
QUERY_TYPE_USER | final public static String QUERY_TYPE_USER(Code) | | |
createStatisticsQueryCriteria | public StatisticsQueryCriteria createStatisticsQueryCriteria()(Code) | | Factory to create new statistics query criteria
a newly create statistics empty criteria |
forceFlush | public void forceFlush()(Code) | | force the database loggers to flush out
|
getDataSource | public DataSource getDataSource()(Code) | | DataSource in use by the logger useful for writing decent tests |
getDefaultEmptyAggregateStatistics | public AggregateStatistics getDefaultEmptyAggregateStatistics()(Code) | | Factory to create new, empty, aggregate statistics object.
unpopulated AggregateStatistics object |
getListOfLoggedInUsers | public List getListOfLoggedInUsers()(Code) | | |
getNumberOfCurrentUsers | public int getNumberOfCurrentUsers()(Code) | | returns the current number of logged in users |
getNumberOfLoggedInUsers | public int getNumberOfLoggedInUsers()(Code) | | |
logPageAccess | public void logPageAccess(RequestContext request, String statusCode, long msElapsedTime)(Code) | | Logs an access to a page.
Parameters: request - current request info object Parameters: statusCode - HTTP status code Parameters: msElapsedTime - elapsed time the page took to render |
logPortletAccess | public void logPortletAccess(RequestContext request, String portlet, String statusCode, long msElapsedTime)(Code) | | Logs an access to a portlet.
Parameters: request - current request info object Parameters: portlet - portlet being logged Parameters: statusCode - HTTP status code. Parameters: msElapsedTime - elapsed time the portlet took to render |
logUserLogin | public void logUserLogin(RequestContext request, long msElapsedLoginTime)(Code) | | Logs a user logout event. The %s (HTTP status code) field of the log
entry will be set to 200 (OK).
Parameters: request - current request info object Parameters: msElapsedLoginTime - time it took the user to login |
logUserLogout | public void logUserLogout(String ipAddress, String userName, long msSessionLength)(Code) | | Logs a user logout event. The %s (HTTP status code) field of the log
entry will be set to 200 (OK).
Parameters: request - current request info object Parameters: msElapsedTime - elapsed time that the user was logged in |
|
|