|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.unamur.inference.web.UserSessionBuilder<ApacheUserSession,ApacheUserRequest>
be.unamur.inference.web.apache.ApacheUserSessionBuilder
public class ApacheUserSessionBuilder
This class is used to process Apache user sessions from an Apache web log. The default usage of this class is:
UserSessionProcessor<ApacheUserSession> listener;
UserRequestFilter<ApacheUserRequest> includeFilter;
UserRequestFilter<ApacheUserRequest> excludeFilter;
// ...
newInstance().logFormat(ApacheLogFormatPatternBuilder.COMMON_LOG_FORMAT)
.sessionTimeout(ApacheUserSessionBuilder.DEFAULT_TIMEOUT)
.include(includeFilter)
.exclude(excludeFilter)
.addListener(listener)
.buildSessions(new FileInputStream("apache-web.log"));
ApacheUserSession,
ApacheLogFormatPatternBuilder| Field Summary | |
|---|---|
static long |
DEFAULT_TIMEOUT
The default timeout for the sessions. |
| Method Summary | |
|---|---|
void |
buildSessions(InputStream input)
Build the session from the different request of the InputStream. |
ApacheUserSessionBuilder |
logFormat(String logFormat)
Specify the log format to use. |
static ApacheUserSessionBuilder |
newInstance()
Returns a new instance of this class. |
ApacheUserSessionBuilder |
sessionTimeout(long timeout)
Set the timeout to consider for the user sessions. |
| Methods inherited from class be.unamur.inference.web.UserSessionBuilder |
|---|
addListener, exclude, include, isAcceptedRequest, sessionCompleted |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long DEFAULT_TIMEOUT
| Method Detail |
|---|
public static ApacheUserSessionBuilder newInstance()
public ApacheUserSessionBuilder logFormat(String logFormat)
ApacheLogFormatPatternBuilder.COMMON_LOG_FORMAT.
logFormat - The new log format to use.
public ApacheUserSessionBuilder sessionTimeout(long timeout)
ApacheUserSessionBuilder.DEFAULT_TIMEOUT
timeout - The new timeout.
public void buildSessions(InputStream input)
throws SessionBuildException
UserSessionBuilderInputStream.
Each time a session is build, the sessionCompleted(Session) method is
called to notify the listeners of the builder. All the requests in the
builded sessions have to satisfy isAcceptedRequest(Request).
buildSessions in class UserSessionBuilder<ApacheUserSession,ApacheUserRequest>input - The InputStream to read.
SessionBuildException - If an exception occurs during the building
of the sessions.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||