|
Jacson | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.spieleck.app.jacson.PluginBase de.spieleck.app.jacson.filter.FilterBase de.spieleck.app.jacson.filter.ConstFilter de.spieleck.app.jacson.filter.WebSessionFilter
A hack to derive something like a session from a web log file by using
the well known ip=user session till timeout logic. This isn't working
great, but it is working.
Note: The implementation depends on the fact that timestamps
are monotonical increasing in the logfile. If this isn't the case we
are in real trouble.
Note: The implementation currently cannot merge sessions between
multiple input streams (separated by null chunks)
The plugin understands the following parameters:
RegExpUtil
Field Summary | |
static java.lang.String |
CLIENTREGEXP_NODE
|
protected java.text.DateFormat |
dateFormat
Date parse format |
static java.lang.String |
DATEFORMAT_NODE
|
protected org.apache.oro.text.regex.Pattern |
datePattern
Date regular expression |
static java.lang.String |
DATEREGEXP_NODE
|
static java.lang.String |
DEFAULT_DATEFORMAT
|
protected org.apache.oro.text.regex.Pattern |
idPattern
ID regular expression |
protected long |
lastTime
Object caching for speedup (flyweight pattern) |
protected java.lang.Long |
lastTimeLong
Object caching for speedup (flyweight pattern) |
protected RegExpUtil |
rutil
Utility for regular expressions |
protected int |
timeout
The timeout assumed for a session |
static java.lang.String |
TIMEOUT_NODE
|
static java.lang.String |
WSF
|
Fields inherited from class de.spieleck.app.jacson.filter.ConstFilter |
inverse |
Fields inherited from class de.spieleck.app.jacson.filter.FilterBase |
drain |
Fields inherited from interface de.spieleck.app.jacson.filter.FilterNames |
COUNT_NODE, INVERSE_NODE |
Constructor Summary | |
WebSessionFilter()
|
Method Summary | |
boolean |
accept(ConfigNode node)
|
protected void |
flushSessions(long limit)
Clean up the stored sessions up to a certain point in history. |
void |
init(ConfigNode node,
JacsonRegistry registry)
|
protected java.lang.String |
matching(java.lang.String chunk,
org.apache.oro.text.regex.Pattern p)
Convenience method to extract a string from a chunk via a match. |
void |
putChunk(java.lang.String chunk)
Feed a single chunk into this filter |
Methods inherited from class de.spieleck.app.jacson.filter.ConstFilter |
summary |
Methods inherited from class de.spieleck.app.jacson.filter.FilterBase |
setDrain |
Methods inherited from class de.spieleck.app.jacson.PluginBase |
getRegReport, getRegState, registerReport, registerState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.spieleck.app.jacson.JacsonStately |
registerState |
Methods inherited from interface de.spieleck.app.jacson.JacsonReporting |
registerReport |
Field Detail |
public static final java.lang.String TIMEOUT_NODE
public static final java.lang.String DATEREGEXP_NODE
public static final java.lang.String CLIENTREGEXP_NODE
public static final java.lang.String DATEFORMAT_NODE
public static final java.lang.String DEFAULT_DATEFORMAT
public static final java.lang.String WSF
protected RegExpUtil rutil
protected int timeout
protected org.apache.oro.text.regex.Pattern datePattern
protected java.text.DateFormat dateFormat
protected org.apache.oro.text.regex.Pattern idPattern
protected long lastTime
protected java.lang.Long lastTimeLong
Constructor Detail |
public WebSessionFilter()
Method Detail |
public void init(ConfigNode node, JacsonRegistry registry) throws JacsonConfigException
init
in interface JacsonRegistrable
init
in class ConstFilter
JacsonConfigException
public boolean accept(ConfigNode node)
accept
in interface ConfigVerify.Acceptor
accept
in class ConstFilter
public void putChunk(java.lang.String chunk) throws JacsonException
JacsonChunkDrain
putChunk
in interface JacsonChunkDrain
putChunk
in class ConstFilter
JacsonException
protected void flushSessions(long limit) throws JacsonException
JacsonException
protected java.lang.String matching(java.lang.String chunk, org.apache.oro.text.regex.Pattern p)
|
Spieleck | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |