|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.protocol.http.RequestLogger
public class RequestLogger
This is the logger class that can be set in the
Application.getRequestLogger()
method. If this class
is set all request and live sessions will be recorded and displayed From the total created
sessions, to the peak session count and the current livesessions. For the livesessions the
request logger will record what request are happening what kind of IRequestTarget
was the
event target and what IRequestTarget
was the response target. It also records what
session data was touched for this and how long the request did take.
To view this information live see the InspectorBug
that shows the InspectorPage
with the LiveSessionsPage
Nested Class Summary | |
---|---|
static interface |
RequestLogger.ISessionLogInfo
This interface can be implemented in a custom session object. |
static class |
RequestLogger.SessionData
This class hold the information one request of a session has. |
Nested classes/interfaces inherited from interface org.apache.wicket.protocol.http.IRequestLogger |
---|
IRequestLogger.RequestData |
Field Summary | |
---|---|
protected static org.slf4j.Logger |
log
log. |
Constructor Summary | |
---|---|
RequestLogger()
Construct. |
Method Summary | |
---|---|
protected AppendingStringBuffer |
createLogString(IRequestLogger.RequestData rd,
RequestLogger.SessionData sd,
boolean includeRuntimeInfo)
|
int |
getCurrentActiveRequestCount()
|
RequestLogger.SessionData[] |
getLiveSessions()
|
int |
getPeakActiveRequestCount()
|
int |
getPeakSessions()
|
List<IRequestLogger.RequestData> |
getRequests()
This method returns a List of the current requests that are in mem. |
int |
getTotalCreatedSessions()
|
protected void |
log(IRequestLogger.RequestData rd,
RequestLogger.SessionData sd)
|
void |
logEventTarget(IRequestTarget target)
Sets the target that was the event target for the current request |
void |
logResponseTarget(IRequestTarget target)
Sets the target that was the response target for the current request |
void |
objectCreated(Object value)
Called to monitor additions of objects in the ISessionStore |
void |
objectRemoved(Object value)
Called to monitor removals of objects out of the ISessionStore |
void |
objectUpdated(Object value)
Called to monitor updates of objects in the ISessionStore |
void |
requestTime(long timeTaken)
This method is called when the request is over. |
void |
sessionCreated(String sessionId)
called when the session is created and has an id. |
void |
sessionDestroyed(String sessionId)
Method used to cleanup a livesession when the session was invalidated by the webcontainer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.slf4j.Logger log
Constructor Detail |
---|
public RequestLogger()
Method Detail |
---|
public int getTotalCreatedSessions()
getTotalCreatedSessions
in interface IRequestLogger
IRequestLogger.getTotalCreatedSessions()
public int getPeakSessions()
getPeakSessions
in interface IRequestLogger
IRequestLogger.getPeakSessions()
public int getCurrentActiveRequestCount()
getCurrentActiveRequestCount
in interface IRequestLogger
IRequestLogger.getCurrentActiveRequestCount()
public int getPeakActiveRequestCount()
getPeakActiveRequestCount
in interface IRequestLogger
IRequestLogger.getPeakActiveRequestCount()
public List<IRequestLogger.RequestData> getRequests()
IRequestLogger
getRequests
in interface IRequestLogger
IRequestLogger.getRequests()
public RequestLogger.SessionData[] getLiveSessions()
getLiveSessions
in interface IRequestLogger
public void sessionDestroyed(String sessionId)
IRequestLogger
sessionDestroyed
in interface IRequestLogger
sessionId
- the session idIRequestLogger.sessionDestroyed(java.lang.String)
public void sessionCreated(String sessionId)
IRequestLogger
sessionCreated
in interface IRequestLogger
sessionId
- the session idIRequestLogger.sessionDestroyed(java.lang.String)
public void requestTime(long timeTaken)
IRequestLogger
requestTime
in interface IRequestLogger
timeTaken
- the time taken in millisecondsIRequestLogger.requestTime(long)
protected void log(IRequestLogger.RequestData rd, RequestLogger.SessionData sd)
rd
- sd
- protected AppendingStringBuffer createLogString(IRequestLogger.RequestData rd, RequestLogger.SessionData sd, boolean includeRuntimeInfo)
public void objectRemoved(Object value)
IRequestLogger
ISessionStore
objectRemoved
in interface IRequestLogger
value
- the object being removedIRequestLogger.objectRemoved(java.lang.Object)
public void objectUpdated(Object value)
IRequestLogger
ISessionStore
objectUpdated
in interface IRequestLogger
value
- the object being updatedIRequestLogger.objectUpdated(java.lang.Object)
public void objectCreated(Object value)
IRequestLogger
ISessionStore
objectCreated
in interface IRequestLogger
value
- the object being created/addedIRequestLogger.objectCreated(java.lang.Object)
public void logResponseTarget(IRequestTarget target)
IRequestLogger
logResponseTarget
in interface IRequestLogger
target
- the response targetIRequestLogger.logResponseTarget(org.apache.wicket.IRequestTarget)
public void logEventTarget(IRequestTarget target)
IRequestLogger
logEventTarget
in interface IRequestLogger
target
- the event targetIRequestLogger.logEventTarget(org.apache.wicket.IRequestTarget)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |