wicket.protocol.http
Class RequestLogger

java.lang.Object
  extended by wicket.protocol.http.RequestLogger

public class RequestLogger
extends java.lang.Object

This is the logger class that can be set in the WebApplication.setRequestLogger(RequestLogger) 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 This class is still a bit experimental for the 1.2 release. Will improve further in 2.0

Since:
1.2
Author:
jcompagner

Nested Class Summary
static class RequestLogger.RequestData
          This class hold the information one request of a session has.
static class RequestLogger.SessionData
          This class hols the information one sessions has
 
Constructor Summary
RequestLogger()
          Construct.
 
Method Summary
 java.util.Collection getLiveSessions()
           
 int getPeakSessions()
           
 int getTotalCreatedSessions()
           
 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(java.lang.Object value)
          Called to monitor additions of objects in the ISessionStore
 void objectRemoved(java.lang.Object value)
          Called to monitor removals of objects out of the ISessionStore
 void objectUpdated(java.lang.Object value)
          Called to monitor updates of objects in the ISessionStore
 void requestTime(long timeTaken)
          This method is called when the request is over this will set the total time a request takes and cleans up the current request data.
 void sessionDestroyed(java.lang.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
 

Constructor Detail

RequestLogger

public RequestLogger()
Construct.

Method Detail

getTotalCreatedSessions

public int getTotalCreatedSessions()
Returns:
The total created sessions counter

getPeakSessions

public int getPeakSessions()
Returns:
The peak sessions counter

getLiveSessions

public java.util.Collection getLiveSessions()
Returns:
Collection of live Sessions

sessionDestroyed

public void sessionDestroyed(java.lang.String sessionId)
Method used to cleanup a livesession when the session was invalidated by the webcontainer

Parameters:
sessionId -

requestTime

public void requestTime(long timeTaken)
This method is called when the request is over this will set the total time a request takes and cleans up the current request data.

Parameters:
timeTaken -

objectRemoved

public void objectRemoved(java.lang.Object value)
Called to monitor removals of objects out of the ISessionStore

Parameters:
value -

objectUpdated

public void objectUpdated(java.lang.Object value)
Called to monitor updates of objects in the ISessionStore

Parameters:
value -

objectCreated

public void objectCreated(java.lang.Object value)
Called to monitor additions of objects in the ISessionStore

Parameters:
value -

logResponseTarget

public void logResponseTarget(IRequestTarget target)
Sets the target that was the response target for the current request

Parameters:
target -

logEventTarget

public void logEventTarget(IRequestTarget target)
Sets the target that was the event target for the current request

Parameters:
target -


Copyright © 2004-2007 Wicket developers. All Rights Reserved.