|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortalStatistics
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:
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"
Field Summary | |
---|---|
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
|
Method Summary | |
---|---|
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 |
getListOfLoggedInUsers()
|
int |
getNumberOfCurrentUsers()
|
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)
|
Field Detail |
---|
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
Method Detail |
---|
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)
request
- current request info objectmsElapsedTime
- elapsed time that the user was logged invoid logUserLogin(RequestContext request, long msElapsedLoginTime)
request
- current request info objectmsElapsedLoginTime
- time it took the user to loginint getNumberOfCurrentUsers()
void forceFlush()
DataSource getDataSource()
AggregateStatistics queryStatistics(StatisticsQueryCriteria criteria) throws InvalidCriteriaException
InvalidCriteriaException
int getNumberOfLoggedInUsers()
List getListOfLoggedInUsers()
StatisticsQueryCriteria createStatisticsQueryCriteria()
AggregateStatistics getDefaultEmptyAggregateStatistics()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |