Package org.apache.wicket.protocol.http
Interface IRequestLogger
-
- All Known Implementing Classes:
AbstractRequestLogger,RequestLogger
public interface IRequestLoggerInterface for the request logger and viewer.- Author:
- jcompagner
- See Also:
Application.newRequestLogger()
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIRequestLogger.ISessionLogInfoThis interface can be implemented in a custom session object.static classIRequestLogger.RequestDataThis class hold the information one request of a session has.static classIRequestLogger.SessionDataThis class hold the information one request of a session has.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetAverageRequestTime()intgetCurrentActiveRequestCount()IRequestLogger.RequestDatagetCurrentRequest()IRequestLogger.SessionData[]getLiveSessions()intgetPeakActiveRequestCount()intgetPeakSessions()java.util.List<IRequestLogger.RequestData>getRequests()This method returns a List of the current requests that are in mem.longgetRequestsPerMinute()intgetTotalCreatedSessions()voidlogEventTarget(org.apache.wicket.request.IRequestHandler target)Sets the target that was the event target for the current requestvoidlogRequestedUrl(java.lang.String url)Logs the URL that was requested by the browser.voidlogResponseTarget(org.apache.wicket.request.IRequestHandler target)Sets the target that was the response target for the current requestvoidobjectCreated(java.lang.Object value)Called to monitor additions of objects in theISessionStorevoidobjectRemoved(java.lang.Object value)Called to monitor removals of objects out of theISessionStorevoidobjectUpdated(java.lang.Object value)Called to monitor updates of objects in theISessionStorevoidperformLogging()Perform the actual loggingvoidrequestTime(long timeTaken)This method is called when the request is over.voidsessionCreated(java.lang.String id)called when the session is created and has an id.voidsessionDestroyed(java.lang.String sessionId)Method used to cleanup a livesession when the session was invalidated by the webcontainer
-
-
-
Method Detail
-
getTotalCreatedSessions
int getTotalCreatedSessions()
- Returns:
- The total created sessions counter
-
getPeakSessions
int getPeakSessions()
- Returns:
- The peak sessions counter
-
getRequests
java.util.List<IRequestLogger.RequestData> getRequests()
This method returns a List of the current requests that are in mem. This is a readonly list.- Returns:
- Collection of the current requests
-
getLiveSessions
IRequestLogger.SessionData[] getLiveSessions()
- Returns:
- Collection of live Sessions Data
-
getCurrentActiveRequestCount
int getCurrentActiveRequestCount()
- Returns:
- The current active requests
-
getCurrentRequest
IRequestLogger.RequestData getCurrentRequest()
- Returns:
- The
IRequestLogger.RequestDatafor the current request.
-
getPeakActiveRequestCount
int getPeakActiveRequestCount()
- Returns:
- The peak active requests
-
getRequestsPerMinute
long getRequestsPerMinute()
- Returns:
- The number of requests per minute.
-
getAverageRequestTime
long getAverageRequestTime()
- Returns:
- The average request time.
-
sessionCreated
void sessionCreated(java.lang.String id)
called when the session is created and has an id. (for http it means that the http session is created)- Parameters:
id- the session id
-
sessionDestroyed
void sessionDestroyed(java.lang.String sessionId)
Method used to cleanup a livesession when the session was invalidated by the webcontainer- Parameters:
sessionId- the session id
-
requestTime
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- the time taken in milliseconds
-
objectRemoved
void objectRemoved(java.lang.Object value)
Called to monitor removals of objects out of theISessionStore- Parameters:
value- the object being removed
-
objectUpdated
void objectUpdated(java.lang.Object value)
Called to monitor updates of objects in theISessionStore- Parameters:
value- the object being updated
-
objectCreated
void objectCreated(java.lang.Object value)
Called to monitor additions of objects in theISessionStore- Parameters:
value- the object being created/added
-
logResponseTarget
void logResponseTarget(org.apache.wicket.request.IRequestHandler target)
Sets the target that was the response target for the current request- Parameters:
target- the response target
-
logEventTarget
void logEventTarget(org.apache.wicket.request.IRequestHandler target)
Sets the target that was the event target for the current request- Parameters:
target- the event target
-
logRequestedUrl
void logRequestedUrl(java.lang.String url)
Logs the URL that was requested by the browser.- Parameters:
url- the requested URL
-
performLogging
void performLogging()
Perform the actual logging
-
-