|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.stat.StatManager
public class StatManager
This class manages access log and produces statistics reports.
Field Summary | |
---|---|
protected static Map |
analyseMap
|
static long |
MAX_REQUEST_DURATION
|
static long |
REQUEST_TIMEOUT
|
static String |
REVISION
|
static long |
SESSION_TIMEOUT
|
static String |
STAT_FILE_PATTERN
|
protected static org.apache.oro.text.regex.Pattern[][] |
STAT_IGNORE_PATTERN
|
static String |
STAT_REPORT_PATTERN
|
static ReadWriteAccessController |
statrwac
|
Fields inherited from interface com.jalios.util.JaliosConstants |
---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR |
Method Summary | |
---|---|
static StatHandler |
analyse(StatReport report,
Member loggedMember,
boolean join)
Analyse a report of stats from now - report.periodicity |
static StatHandler |
analyse(StatReport report,
Member loggedMember,
boolean join,
long oldDate,
long nowDate)
Analyse a report of stats from olddate to nowdate |
static void |
analyseAndRender(StatReport report,
Member loggedMember)
Analyse and Render a report of stats |
static void |
analyseAndRender(StatReport report,
Member loggedMember,
long oldDate,
long nowDate)
Analyse and Render a report of stats |
static void |
appendStatEntry(javax.servlet.http.HttpServletRequest request,
long startPageRequest)
Append a stat entry (called byte doStats.jsp) |
static void |
appendStatEntry(javax.servlet.http.HttpServletRequest request,
long startPageRequest,
long endPageRequest)
Append a stat entry (called byte doStats.jsp) |
protected static StatHandler |
buildStatHandler(long oldDate,
long nowDate,
PortalElement report)
Build the StatHandler |
static boolean |
canAnalyze()
|
static boolean |
canAnalyze(StatReport report,
Member member)
Check if analyse can be done on this report. |
static boolean |
canAnalyze(StatReport report,
Member member,
StatHandler statHandler)
Check if analyse can be done on this report. |
static boolean |
canResolveHost()
|
static boolean |
canStat()
|
static void |
checkRequestDuration(javax.servlet.http.HttpServletRequest req,
long startPageRequest)
This method warn if a request duration is too long |
static StatListener |
createStatListener(PortletStat portlet,
PortalElement report)
Instanciate a StatListener from a given portlet calling StatPolicy hooks |
static StatListener |
createStatListener(PortletStat portlet,
PortalElement report,
String clazzstr)
Instanciate a StatListener from a given portlet without any other check |
protected static String |
dataToString(Data data)
|
protected static String |
dataToString(Data[] data)
|
static Map |
getAllReport()
Build a [Map of Workspace] > [Map of Report] > [Set of Report Version] |
static Map |
getAllReport(Workspace workspace)
Return all the Files representing a given report for a given workspace |
static Set |
getAllReport(Workspace workspace,
StatReport report)
Return all the Files representing a given report for a given workspace |
static Set |
getExistingStatFiles(long oldDate,
long nowDate)
Return the list of stat files that exist between date1 and date2. |
static org.apache.oro.text.regex.Pattern[][] |
getIgnorePattern(Channel channel)
Return all the Pattern to find stat line to escape. |
static StatManager |
getInstance()
|
static Date |
getReportDate(String reportName)
|
static long |
getRequestTimeOut()
|
static long |
getSessionTimeOut()
|
static StatAnalyser |
getStatAnalyser(StatReport report,
boolean remove)
Return and remove the StatAnalyser of the given Report |
static Set |
getStatPortletSet(PortalElement portal)
Get all portletStat under the given PortalElement |
static String |
getStatReportDirectory(String workspaceId,
String reportId)
Return the directory where to generate all the stats |
static String |
getStatReportFile(long date)
Return the directory where to generate all the stats |
static MonitoredInputStream |
getStatStream(long oldDate,
long nowDate)
Return the MonitoredInputStream of stat files that exist between date1 and date2. |
static Set |
getWorkspaceSet(StatReport report)
Get all the workspace to use for this report. |
void |
init()
|
static boolean |
isGlobalReport(StatReport report)
Indicate if the Report is a Channel Report or a Workspace Report Look for channel properties definition. |
static void |
lockAnalyse(boolean lock,
StatReport report,
StatAnalyser analyser)
Lock the analyse for a given report. |
static boolean |
matchPattern(StatEntry entry)
Check if the StatEntry match a pattern. |
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk. |
static void |
render(StatHandler statHandler,
StatReport report,
Member member)
Render the statsReport.jsp to an HTMLFile |
protected static void |
renderPortlet(StatHandler statHandler,
PortalElement portlet,
Member loggedMember,
String statDirectory,
String jspKey,
String jsp,
String html,
Workspace workspace)
Try to render a Portlet from a JSP to an html file The rendering folder should be created |
void |
scheduleAlarm()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public static final String STAT_FILE_PATTERN
public static final String STAT_REPORT_PATTERN
public static final long SESSION_TIMEOUT
public static final long REQUEST_TIMEOUT
public static final long MAX_REQUEST_DURATION
protected static org.apache.oro.text.regex.Pattern[][] STAT_IGNORE_PATTERN
public static final ReadWriteAccessController statrwac
protected static final Map analyseMap
Method Detail |
---|
public static StatManager getInstance()
public void init()
public void scheduleAlarm()
public void propertiesChange(JProperties properties)
JPropertiesListener
You cannot alter the value received in parameters.
propertiesChange
in interface JPropertiesListener
properties
- the properties which have been modified (may not contain all JCMS properties)public static void checkRequestDuration(javax.servlet.http.HttpServletRequest req, long startPageRequest)
req
- the ServletRequeststartPageRequest
- the starting page requestpublic static void appendStatEntry(javax.servlet.http.HttpServletRequest request, long startPageRequest) throws IOException
request
- the requeststartPageRequest
- the starting time of this page
IOException
public static void appendStatEntry(javax.servlet.http.HttpServletRequest request, long startPageRequest, long endPageRequest) throws IOException
request
- the requeststartPageRequest
- the starting time of this page
IOException
protected static String dataToString(Data data)
protected static String dataToString(Data[] data)
public static org.apache.oro.text.regex.Pattern[][] getIgnorePattern(Channel channel)
channel
- public static boolean matchPattern(StatEntry entry)
entry
-
public static StatAnalyser getStatAnalyser(StatReport report, boolean remove)
report
-
public static StatHandler analyse(StatReport report, Member loggedMember, boolean join) throws Exception
report
- the StatReportloggedMember
- the Member doing analysejoin
- Should wait end of analyse
Exception
public static StatHandler analyse(StatReport report, Member loggedMember, boolean join, long oldDate, long nowDate) throws Exception
report
- the StatReportloggedMember
- the Member doing analysejoin
- Should wait end of analysenowDate
- the analyse date
Exception
public static void analyseAndRender(StatReport report, Member loggedMember) throws Exception
report
- the StatReportloggedMember
- the Member doing analyse
Exception
public static void analyseAndRender(StatReport report, Member loggedMember, long oldDate, long nowDate) throws Exception
report
- the StatReportloggedMember
- the Member doing analysenowDate
- the starting date
Exception
public static void lockAnalyse(boolean lock, StatReport report, StatAnalyser analyser)
lock
- the action to do : lock or unlockreport
- the report to work withanalyser
- the analyser doing the jobpublic static boolean canAnalyze(StatReport report, Member member)
report
- member
-
public static boolean canAnalyze(StatReport report, Member member, StatHandler statHandler)
report
- member
- statHandler
-
protected static void renderPortlet(StatHandler statHandler, PortalElement portlet, Member loggedMember, String statDirectory, String jspKey, String jsp, String html, Workspace workspace) throws Exception
Exception
public static void render(StatHandler statHandler, StatReport report, Member member)
statHandler
- protected static StatHandler buildStatHandler(long oldDate, long nowDate, PortalElement report) throws Exception
oldDate
- nowDate
- report
-
Exception
public static String getStatReportDirectory(String workspaceId, String reportId)
public static String getStatReportFile(long date)
date
-
public static Date getReportDate(String reportName)
public static Set getAllReport(Workspace workspace, StatReport report)
workspace
- report
-
public static Map getAllReport(Workspace workspace)
workspace
-
public static Map getAllReport()
public static StatListener createStatListener(PortletStat portlet, PortalElement report)
portlet
-
public static StatListener createStatListener(PortletStat portlet, PortalElement report, String clazzstr)
portlet
-
public static MonitoredInputStream getStatStream(long oldDate, long nowDate)
oldDate
- the date from which the analyse startnowDate
- the date from which the analyse end
public static Set getExistingStatFiles(long oldDate, long nowDate)
oldDate
- the date from which the analyse startnowDate
- the date from which the analyse end
public static Set getStatPortletSet(PortalElement portal)
portal
-
public static Set getWorkspaceSet(StatReport report)
report
- the report to work with
public static boolean isGlobalReport(StatReport report)
report
-
public static long getSessionTimeOut()
public static long getRequestTimeOut()
public static boolean canAnalyze()
public static boolean canStat()
public static boolean canResolveHost()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |