- All Known Implementing Classes:
AbstractRequestLogger
,JsonRequestLogger
,RequestLogger
public interface IRequestLogger
Interface for the request logger and viewer.
- Author:
- jcompagner
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
This interface can be implemented in a custom session object.static class
This class hold the information one request of a session has.static class
This class hold the information one request of a session has. -
Method Summary
Modifier and TypeMethodDescriptionlong
int
int
int
This method returns a List of the current requests that are in mem.long
int
void
logEventTarget
(IRequestHandler target) Sets the target that was the event target for the current requestvoid
logRequestedUrl
(String url) Logs the URL that was requested by the browser.void
logResponseTarget
(IRequestHandler target) Sets the target that was the response target for the current requestvoid
objectCreated
(Object value) Called to monitor additions of objects in theISessionStore
void
objectRemoved
(Object value) Called to monitor removals of objects out of theISessionStore
void
objectUpdated
(Object value) Called to monitor updates of objects in theISessionStore
void
Perform the actual loggingvoid
requestTime
(long timeTaken) This method is called when the request is over.void
sessionCreated
(String id) 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
-
Method Details
-
getTotalCreatedSessions
int getTotalCreatedSessions()- Returns:
- The total created sessions counter
-
getPeakSessions
int getPeakSessions()- Returns:
- The peak sessions counter
-
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
- Returns:
- Collection of live Sessions Data
-
getCurrentActiveRequestCount
- Returns:
- The current active requests
-
getCurrentRequest
- Returns:
- The
IRequestLogger.RequestData
for the current request.
-
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
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
Method used to cleanup a livesession when the session was invalidated by the webcontainer- Parameters:
sessionId
- the session id
-
requestTime
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
Called to monitor removals of objects out of theISessionStore
- Parameters:
value
- the object being removed
-
objectUpdated
Called to monitor updates of objects in theISessionStore
- Parameters:
value
- the object being updated
-
objectCreated
Called to monitor additions of objects in theISessionStore
- Parameters:
value
- the object being created/added
-
logResponseTarget
Sets the target that was the response target for the current request- Parameters:
target
- the response target
-
logEventTarget
Sets the target that was the event target for the current request- Parameters:
target
- the event target
-
logRequestedUrl
Logs the URL that was requested by the browser.- Parameters:
url
- the requested URL
-
performLogging
void performLogging()Perform the actual logging
-