public abstract class AbstractRequestLogger extends Object implements IRequestLogger
The information in the log files can take any format, depending on the request logger
implementation: currently Wicket supports two formats: a legacy, log4j
compatible format, and a JSON format.
IRequestLogger.ISessionLogInfo, IRequestLogger.RequestData, IRequestLogger.SessionData| Constructor and Description |
|---|
AbstractRequestLogger()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRequest(IRequestLogger.RequestData rd) |
protected String |
formatDate(Date date)
Thread-safely formats the passed date in format 'yyyy-MM-dd hh:mm:ss,SSS' with GMT timezone
|
long |
getAverageRequestTime() |
int |
getCurrentActiveRequestCount() |
protected IRequestLogger.RequestData |
getCurrentRequest() |
IRequestLogger.SessionData[] |
getLiveSessions() |
int |
getPeakActiveRequestCount() |
int |
getPeakSessions() |
List<IRequestLogger.RequestData> |
getRequests()
This method returns a List of the current requests that are in mem.
|
long |
getRequestsPerMinute() |
int |
getTotalCreatedSessions() |
protected abstract void |
log(IRequestLogger.RequestData rd,
IRequestLogger.SessionData sd) |
void |
logEventTarget(IRequestHandler requestHandler)
Sets the target that was the event target for the current request
|
void |
logRequestedUrl(String url)
Logs the URL that was requested by the browser.
|
void |
logResponseTarget(IRequestHandler requestHandler)
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 |
performLogging()
Perform the actual logging
|
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
|
public int getCurrentActiveRequestCount()
getCurrentActiveRequestCount in interface IRequestLoggerpublic int getPeakActiveRequestCount()
getPeakActiveRequestCount in interface IRequestLoggerpublic IRequestLogger.SessionData[] getLiveSessions()
getLiveSessions in interface IRequestLoggerpublic int getPeakSessions()
getPeakSessions in interface IRequestLoggerpublic List<IRequestLogger.RequestData> getRequests()
IRequestLoggergetRequests in interface IRequestLoggerpublic int getTotalCreatedSessions()
getTotalCreatedSessions in interface IRequestLoggerpublic void objectCreated(Object value)
IRequestLoggerISessionStoreobjectCreated in interface IRequestLoggervalue - the object being created/addedpublic void objectRemoved(Object value)
IRequestLoggerISessionStoreobjectRemoved in interface IRequestLoggervalue - the object being removedpublic void objectUpdated(Object value)
IRequestLoggerISessionStoreobjectUpdated in interface IRequestLoggervalue - the object being updatedpublic void requestTime(long timeTaken)
IRequestLoggerrequestTime in interface IRequestLoggertimeTaken - the time taken in millisecondspublic void sessionCreated(String sessionId)
IRequestLoggersessionCreated in interface IRequestLoggersessionId - the session idpublic void sessionDestroyed(String sessionId)
IRequestLoggersessionDestroyed in interface IRequestLoggersessionId - the session idprotected IRequestLogger.RequestData getCurrentRequest()
public void performLogging()
IRequestLoggerperformLogging in interface IRequestLoggerprotected abstract void log(IRequestLogger.RequestData rd, IRequestLogger.SessionData sd)
protected void addRequest(IRequestLogger.RequestData rd)
public long getAverageRequestTime()
getAverageRequestTime in interface IRequestLoggerpublic long getRequestsPerMinute()
getRequestsPerMinute in interface IRequestLoggerpublic void logEventTarget(IRequestHandler requestHandler)
IRequestLoggerlogEventTarget in interface IRequestLoggerrequestHandler - the event targetpublic void logRequestedUrl(String url)
IRequestLoggerlogRequestedUrl in interface IRequestLoggerurl - the requested URLpublic void logResponseTarget(IRequestHandler requestHandler)
IRequestLoggerlogResponseTarget in interface IRequestLoggerrequestHandler - the response targetCopyright © 2006–2014 Apache Software Foundation. All rights reserved.