public interface PortalStatistics
"%h %l %u %t \"%r\" %>s %b"
where:
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"
Modifier and Type | Field and Description |
---|---|
static String |
HTTP_ACTION |
static String |
HTTP_EVENT |
static String |
HTTP_INTERNAL_ERROR |
static String |
HTTP_NOT_FOUND |
static String |
HTTP_OK |
static String |
HTTP_UNAUTHORIZED |
static String |
QUERY_TYPE_PAGE |
static String |
QUERY_TYPE_PORTLET |
static String |
QUERY_TYPE_USER |
Modifier and Type | Method and Description |
---|---|
StatisticsQueryCriteria |
createStatisticsQueryCriteria()
Factory to create new statistics query criteria
|
void |
forceFlush()
force the database loggers to flush out
|
DataSource |
getDataSource() |
AggregateStatistics |
getDefaultEmptyAggregateStatistics()
Factory to create new, empty, aggregate statistics object.
|
List<Map<String,UserStats>> |
getListOfLoggedInUsers() |
int |
getNumberOfLoggedInUsers() |
void |
logPageAccess(RequestContext request,
String statusCode,
long msElapsedTime)
Logs an access to a page.
|
void |
logPortletAccess(RequestContext request,
String portlet,
String statusCode,
long msElapsedTime)
Logs an access to a portlet.
|
void |
logUserLogin(RequestContext request,
long msElapsedLoginTime)
Logs a user logout event.
|
void |
logUserLogout(String ipAddress,
String userName,
long msSessionLength)
Logs a user logout event.
|
AggregateStatistics |
queryStatistics(StatisticsQueryCriteria criteria) |
static final String QUERY_TYPE_PORTLET
static final String QUERY_TYPE_USER
static final String QUERY_TYPE_PAGE
static final String HTTP_OK
static final String HTTP_UNAUTHORIZED
static final String HTTP_NOT_FOUND
static final String HTTP_INTERNAL_ERROR
static final String HTTP_ACTION
static final String HTTP_EVENT
void logPortletAccess(RequestContext request, String portlet, String statusCode, long msElapsedTime)
request
- current request info objectportlet
- portlet being loggedstatusCode
- HTTP status code.msElapsedTime
- elapsed time the portlet took to rendervoid logPageAccess(RequestContext request, String statusCode, long msElapsedTime)
request
- current request info objectstatusCode
- HTTP status codemsElapsedTime
- elapsed time the page took to rendervoid logUserLogout(String ipAddress, String userName, long msSessionLength)
ipAddress
- the ip address of the requestuserName
- the name of the user being trackedmsSessionLength
- time that the user was logged invoid logUserLogin(RequestContext request, long msElapsedLoginTime)
request
- current request info objectmsElapsedLoginTime
- time it took the user to loginvoid forceFlush()
DataSource getDataSource()
AggregateStatistics queryStatistics(StatisticsQueryCriteria criteria) throws InvalidCriteriaException
InvalidCriteriaException
int getNumberOfLoggedInUsers()
StatisticsQueryCriteria createStatisticsQueryCriteria()
AggregateStatistics getDefaultEmptyAggregateStatistics()
Copyright © 1999–2016 The Apache Software Foundation. All rights reserved.