org.apache.jetspeed.statistics.impl
Class PortalStatisticsImpl
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
org.apache.jetspeed.statistics.impl.PortalStatisticsImpl
- All Implemented Interfaces:
- org.apache.jetspeed.statistics.PortalStatistics, org.springframework.beans.factory.InitializingBean
public class PortalStatisticsImpl
- extends org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
- implements org.apache.jetspeed.statistics.PortalStatistics
PortalStatisticsImpl
- Version:
- $Id: TestPortletEntityDAO.java,v 1.3 2005/05/24 14:43:19 ate Exp $
- Author:
- Chris Schaefer , David Sean Taylor
Fields inherited from interface org.apache.jetspeed.statistics.PortalStatistics |
HTTP_INTERNAL_ERROR, HTTP_NOT_FOUND, HTTP_OK, HTTP_UNAUTHORIZED, QUERY_TYPE_PAGE, QUERY_TYPE_PORTLET, QUERY_TYPE_USER |
Constructor Summary |
PortalStatisticsImpl(boolean logToCLF,
boolean logToDatabase,
int maxRecordToFlush_Portal,
int maxRecordToFlush_User,
int maxRecordToFlush_Page,
long maxTimeMsToFlush_Portal,
long maxTimeMsToFlush_User,
long maxTimeMsToFlush_Page,
DataSource dataSource)
Default constructor. |
Methods inherited from class org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport |
checkDaoConfig, convertOjbAccessException, createPersistenceBrokerTemplate, getJcdAlias, getPersistenceBroker, getPersistenceBrokerTemplate, releasePersistenceBroker, setJcdAlias, setPersistenceBrokerTemplate |
Methods inherited from class org.springframework.dao.support.DaoSupport |
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.apache.commons.logging.Log logger
portletBatch
protected BatchedStatistics portletBatch
pageBatch
protected BatchedStatistics pageBatch
userBatch
protected BatchedStatistics userBatch
portletLogFormat
protected static final String portletLogFormat
- See Also:
- Constant Field Values
pageLogFormat
protected static final String pageLogFormat
- See Also:
- Constant Field Values
logoutLogFormat
protected static final String logoutLogFormat
- See Also:
- Constant Field Values
STATUS_LOGGED_IN
protected static final int STATUS_LOGGED_IN
- See Also:
- Constant Field Values
STATUS_LOGGED_OUT
protected static final int STATUS_LOGGED_OUT
- See Also:
- Constant Field Values
logToCLF
protected boolean logToCLF
logToDatabase
protected boolean logToDatabase
maxRecordToFlush_Portlet
protected int maxRecordToFlush_Portlet
maxRecordToFlush_User
protected int maxRecordToFlush_User
maxRecordToFlush_Page
protected int maxRecordToFlush_Page
maxTimeMsToFlush_Portlet
protected long maxTimeMsToFlush_Portlet
maxTimeMsToFlush_User
protected long maxTimeMsToFlush_User
maxTimeMsToFlush_Page
protected long maxTimeMsToFlush_Page
ds
protected DataSource ds
currentUserCount
protected int currentUserCount
currentUsers
protected Map currentUsers
formatter
protected SimpleDateFormat formatter
PortalStatisticsImpl
public PortalStatisticsImpl(boolean logToCLF,
boolean logToDatabase,
int maxRecordToFlush_Portal,
int maxRecordToFlush_User,
int maxRecordToFlush_Page,
long maxTimeMsToFlush_Portal,
long maxTimeMsToFlush_User,
long maxTimeMsToFlush_Page,
DataSource dataSource)
Default constructor.
springInit
public void springInit()
throws NamingException
- Throws:
NamingException
getDataSource
public DataSource getDataSource()
- Specified by:
getDataSource
in interface org.apache.jetspeed.statistics.PortalStatistics
logPortletAccess
public void logPortletAccess(org.apache.jetspeed.request.RequestContext request,
String portletName,
String statusCode,
long msElapsedTime)
- Specified by:
logPortletAccess
in interface org.apache.jetspeed.statistics.PortalStatistics
storeAccessToStats
protected void storeAccessToStats(LogRecord record)
saveAccessToCLF
protected void saveAccessToCLF(LogRecord record)
logPageAccess
public void logPageAccess(org.apache.jetspeed.request.RequestContext request,
String statusCode,
long msElapsedTime)
- Specified by:
logPageAccess
in interface org.apache.jetspeed.statistics.PortalStatistics
logUserLogout
public void logUserLogout(String ipAddress,
String userName,
long msSessionLength)
- Specified by:
logUserLogout
in interface org.apache.jetspeed.statistics.PortalStatistics
logUserLogin
public void logUserLogin(org.apache.jetspeed.request.RequestContext request,
long msElapsedLoginTime)
- Specified by:
logUserLogin
in interface org.apache.jetspeed.statistics.PortalStatistics
springDestroy
public void springDestroy()
- See Also:
DisposableBean.destroy()
getNumberOfCurrentUsers
public int getNumberOfCurrentUsers()
- Specified by:
getNumberOfCurrentUsers
in interface org.apache.jetspeed.statistics.PortalStatistics
- See Also:
PortalStatistics.getNumberOfCurrentUsers()
getStartDateFromPeriod
protected Date getStartDateFromPeriod(String period,
Date end)
createStatisticsQueryCriteria
public org.apache.jetspeed.statistics.StatisticsQueryCriteria createStatisticsQueryCriteria()
- Specified by:
createStatisticsQueryCriteria
in interface org.apache.jetspeed.statistics.PortalStatistics
getDefaultEmptyAggregateStatistics
public org.apache.jetspeed.statistics.AggregateStatistics getDefaultEmptyAggregateStatistics()
- Specified by:
getDefaultEmptyAggregateStatistics
in interface org.apache.jetspeed.statistics.PortalStatistics
queryStatistics
public org.apache.jetspeed.statistics.AggregateStatistics queryStatistics(org.apache.jetspeed.statistics.StatisticsQueryCriteria criteria)
throws org.apache.jetspeed.statistics.InvalidCriteriaException
- Specified by:
queryStatistics
in interface org.apache.jetspeed.statistics.PortalStatistics
- Throws:
org.apache.jetspeed.statistics.InvalidCriteriaException
- See Also:
PortalStatistics.queryStatistics(org.apache.jetspeed.statistics.StatisticsQueryCriteria)
floatFormatter
protected String floatFormatter(float f)
getListOfLoggedInUsers
public List getListOfLoggedInUsers()
- Specified by:
getListOfLoggedInUsers
in interface org.apache.jetspeed.statistics.PortalStatistics
getNumberOfLoggedInUsers
public int getNumberOfLoggedInUsers()
- Specified by:
getNumberOfLoggedInUsers
in interface org.apache.jetspeed.statistics.PortalStatistics
forceFlush
public void forceFlush()
- Specified by:
forceFlush
in interface org.apache.jetspeed.statistics.PortalStatistics
- See Also:
PortalStatistics.forceFlush()
Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.