|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.stat.listener.AbstractStatListener com.jalios.jcms.stat.listener.AbstractStatFieldListener
public abstract class AbstractStatFieldListener
A generic abstract class that store log informations in a multiple workspace Map. Map of Workspace > Map of Information > ObectIntTreeMap of counted information
Field Summary | |
---|---|
protected Beautifier |
beautifier
|
long |
handleCount
|
long |
handleTime
|
static String |
REVISION
|
protected long |
t0
|
Fields inherited from class com.jalios.jcms.stat.listener.AbstractStatListener |
---|
ADMIN_AREA, ALL_AREA, channel, display, displayAverage, displayTimeChart, displayWeekChart, FEED_AREA, filteredZone, name, portlet, PUBLIC_AREA, regexpFilter, report, WORK_AREA |
Fields inherited from interface com.jalios.jcms.stat.StatListener |
---|
ALL_WORKSPACE, TRUNCATE |
Constructor Summary | |
---|---|
AbstractStatFieldListener()
|
Method Summary | |
---|---|
Beautifier |
getBeautifier()
Return the Beautifier that will display correctly stored data |
SortedSet |
getCurrentObjSet(String mapKey)
Return the current processing objects |
String |
getNanoDuration()
|
static Object |
getWorkspaceFieldMap(Object workspace,
String field,
Object defaultObject,
Map workspaceMap)
Return the map for a given field for a given workspace |
static Object |
getWorkspaceFieldMap(Object workspace,
String field1,
Object field2,
ObjectIntTreeMap defaultObject1,
Object defaultObject2,
Map workspaceMap)
Return the map for a given field1, field2 for a given workspace |
Map |
getWorkspaceMap()
|
void |
handleEndOfStatEntries()
Called when parsing is finished and then no more line will be send |
abstract void |
handleEndOfStatEntries(Map workspaceMap)
Call EndOfStatEntries with given WorkspaceMap |
boolean |
handleStatEntry(StatEntry entry)
Handle a line of Log |
abstract void |
processEntry(StatEntry entry,
Object workspace,
Map workspaceMap)
Process an object and store it to the workspace map |
Object |
processWorkspace(StatEntry entry)
Get the workspace of the StatEntry |
protected void |
timeStart()
|
protected void |
timeStop()
|
protected static void |
updateWorkspaceMap(Object workspace,
String field1,
Collection incField1,
Object incField2,
Map workspaceMap)
Convenient method calling updateWorkspaceMap() for each element of collection |
protected static void |
updateWorkspaceMap(Object workspace,
String field,
Object incField,
Map workspaceMap)
Update the WORKSPACE > TIME > COUNT Map |
protected static void |
updateWorkspaceMap(Object workspace,
String field1,
Object incField1,
Object incField2,
Map workspaceMap)
Update the WORKSPACE > TIME > FIELD > COUNT Map |
boolean |
validateEntry(StatEntry entry)
Validate the Stat Entry and get the correct parameter to process later. |
Methods inherited from class com.jalios.jcms.stat.listener.AbstractStatListener |
---|
getDisplay, getName, getPortlet, getZone, handleStartDocument, init, isFiltered, setDisplay, setPortlet, setZone, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public long handleTime
public long handleCount
protected Beautifier beautifier
protected long t0
Constructor Detail |
---|
public AbstractStatFieldListener()
Method Detail |
---|
public String getNanoDuration()
public boolean handleStatEntry(StatEntry entry)
StatListener
handleStatEntry
in interface StatListener
handleStatEntry
in class AbstractStatListener
AbstractStatListener.handleStatEntry(StatEntry)
protected void timeStart()
protected void timeStop()
public void handleEndOfStatEntries()
StatListener
handleEndOfStatEntries
in interface StatListener
handleEndOfStatEntries
in class AbstractStatListener
AbstractStatListener.handleEndOfStatEntries()
public boolean validateEntry(StatEntry entry)
entry
-
public abstract void processEntry(StatEntry entry, Object workspace, Map workspaceMap)
entry
- workspace
- workspaceMap
- public abstract void handleEndOfStatEntries(Map workspaceMap)
workspaceMap
- public SortedSet getCurrentObjSet(String mapKey)
public Object processWorkspace(StatEntry entry)
entry
-
protected static void updateWorkspaceMap(Object workspace, String field, Object incField, Map workspaceMap)
protected static void updateWorkspaceMap(Object workspace, String field1, Object incField1, Object incField2, Map workspaceMap)
protected static void updateWorkspaceMap(Object workspace, String field1, Collection incField1, Object incField2, Map workspaceMap)
public static Object getWorkspaceFieldMap(Object workspace, String field, Object defaultObject, Map workspaceMap)
public static Object getWorkspaceFieldMap(Object workspace, String field1, Object field2, ObjectIntTreeMap defaultObject1, Object defaultObject2, Map workspaceMap)
public Map getWorkspaceMap()
public Beautifier getBeautifier()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |