/** * creates a new request logger when requests logging is enabled. * * @return The new request logger * */ protected IRequestLogger newRequestLogger() { return new RequestLogger(); }
/** * @see org.apache.wicket.protocol.http.IRequestLogger#logResponseTarget(org.apache.wicket.IRequestTarget) */ public void logResponseTarget(IRequestTarget target) { getCurrentRequest().addResponseTarget(getRequestTargetString(target)); }
rd.setSessionId(sessionId); Object sessionInfo = getSessionInfo(session); rd.setSessionInfo(sessionInfo); sessionCreated(sessionId); sd = (SessionData)liveSessions.get(sessionId); sd.setSessionSize(sizeInBytes); sd.addTimeTaken(timeTaken); log(rd, sd); log(rd, null); log(rd, null);
/** * @see org.apache.wicket.protocol.http.IRequestLogger#objectCreated(java.lang.Object) */ public void objectCreated(Object value) { RequestData rd = getCurrentRequest(); if (value instanceof Session) { rd.addEntry("Session created"); } else if (value instanceof Page) { Page page = (Page)value; rd.addEntry("Page created, id: " + page.getId() + ", class:" + page.getClass()); } else if (value instanceof IPageMap) { IPageMap map = (IPageMap)value; rd.addEntry("PageMap created, name: " + (map.getName() == null ? "DEFAULT" : map.getName())); } else { rd.addEntry("Custom object created: " + value); } }
rd.setSessionId(sessionId); Object sessionInfo = getSessionInfo(session); rd.setSessionInfo(sessionInfo); sessionCreated(sessionId); sd = liveSessions.get(sessionId); sd.setSessionSize(sizeInBytes); sd.addTimeTaken(timeTaken); log(rd, sd); log(rd, null); log(rd, null);
/** * @see org.apache.wicket.protocol.http.IRequestLogger#objectRemoved(java.lang.Object) */ public void objectRemoved(Object value) { RequestData rd = getCurrentRequest(); if (value instanceof Page) { Page page = (Page)value; rd.addEntry("Page removed, id: " + page.getId() + ", class:" + page.getClass()); } else if (value instanceof IPageMap) { IPageMap map = (IPageMap)value; rd.addEntry("PageMap removed, name: " + (map.getName() == null ? "DEFAULT" : map.getName())); } else if (value instanceof WebSession) { rd.addEntry("Session removed"); } else { rd.addEntry("Custom object removed: " + value); } }
/** * creates a new request logger when requests logging is enabled. * * @return The new request logger * */ protected IRequestLogger newRequestLogger() { return new RequestLogger(); }
/** * @see org.apache.wicket.protocol.http.IRequestLogger#logEventTarget(org.apache.wicket.IRequestTarget) */ public void logEventTarget(IRequestTarget target) { getCurrentRequest().addEventTarget(getRequestTargetString(target)); }
/** * @see org.apache.wicket.protocol.http.IRequestLogger#objectUpdated(java.lang.Object) */ public void objectUpdated(Object value) { RequestData rd = getCurrentRequest(); if (value instanceof Page) { Page page = (Page)value; rd.addEntry("Page updated, id: " + page.getId() + ", class:" + page.getClass()); } else if (value instanceof IPageMap) { IPageMap map = (IPageMap)value; rd.addEntry("PageMap updated, name: " + (map.getName() == null ? "DEFAULT" : map.getName())); } else if (value instanceof Session) { rd.addEntry("Session updated"); } else { rd.addEntry("Custom object updated: " + value); } }
/** * creates a new request logger when requests logging is enabled. * * @return The new request logger * */ protected IRequestLogger newRequestLogger() { return new RequestLogger(); }
/** * @see org.apache.wicket.protocol.http.IRequestLogger#logResponseTarget(org.apache.wicket.IRequestTarget) */ public void logResponseTarget(IRequestTarget target) { getCurrentRequest().addResponseTarget(getRequestTargetString(target)); }
/** * @see org.apache.wicket.protocol.http.IRequestLogger#objectRemoved(java.lang.Object) */ public void objectRemoved(Object value) { RequestData rd = getCurrentRequest(); if (value instanceof Page) { Page page = (Page)value; rd.addEntry("Page removed, id: " + page.getId() + ", class:" + page.getClass()); } else if (value instanceof IPageMap) { IPageMap map = (IPageMap)value; rd.addEntry("PageMap removed, name: " + (map.getName() == null ? "DEFAULT" : map.getName())); } else if (value instanceof WebSession) { rd.addEntry("Session removed"); } else { rd.addEntry("Custom object removed: " + value); } }
/** * creates a new request logger when requests logging is enabled. * * @return The new request logger * */ protected IRequestLogger newRequestLogger() { return new RequestLogger(); }
/** * @see org.apache.wicket.protocol.http.IRequestLogger#logEventTarget(org.apache.wicket.IRequestTarget) */ public void logEventTarget(IRequestTarget target) { getCurrentRequest().addEventTarget(getRequestTargetString(target)); }
/** * @see org.apache.wicket.protocol.http.IRequestLogger#objectUpdated(java.lang.Object) */ public void objectUpdated(Object value) { RequestData rd = getCurrentRequest(); if (value instanceof Page) { Page page = (Page)value; rd.addEntry("Page updated, id: " + page.getId() + ", class:" + page.getClass()); } else if (value instanceof IPageMap) { IPageMap map = (IPageMap)value; rd.addEntry("PageMap updated, name: " + (map.getName() == null ? "DEFAULT" : map.getName())); } else if (value instanceof Session) { rd.addEntry("Session updated"); } else { rd.addEntry("Custom object updated: " + value); } }
IRequestLogger getRequestLogger() { WebApplication webApplication = (WebApplication)Application.get(); IRequestLogger requestLogger = webApplication.getRequestLogger(); if (requestLogger == null) requestLogger = new RequestLogger(); return requestLogger; } }
/** * @see org.apache.wicket.protocol.http.IRequestLogger#objectCreated(java.lang.Object) */ public void objectCreated(Object value) { RequestData rd = getCurrentRequest(); if (value instanceof Session) { rd.addEntry("Session created"); } else if (value instanceof Page) { Page page = (Page)value; rd.addEntry("Page created, id: " + page.getId() + ", class:" + page.getClass()); } else if (value instanceof IPageMap) { IPageMap map = (IPageMap)value; rd.addEntry("PageMap created, name: " + (map.getName() == null ? "DEFAULT" : map.getName())); } else { rd.addEntry("Custom object created: " + value); } }
IRequestLogger getRequestLogger() { WebApplication webApplication = (WebApplication)Application.get(); IRequestLogger requestLogger = webApplication.getRequestLogger(); if (requestLogger == null) requestLogger = new RequestLogger(); return requestLogger; } }
/** * Gets the request logger from the given WebApplication. * * @param webApplication * the web application * @return the request logger */ public static IRequestLogger getRequestLogger(WebApplication webApplication) { if (webApplication == null) { webApplication = (WebApplication)Application.get(); } IRequestLogger requestLogger = webApplication.getRequestLogger(); if (requestLogger == null) { requestLogger = new RequestLogger(); } return requestLogger; }
IRequestLogger getRequestLogger() { WebApplication webApplication = (WebApplication)Application.get(); IRequestLogger requestLogger = webApplication.getRequestLogger(); if (webApplication.getRequestLogger() == null) requestLogger = new RequestLogger(); return requestLogger; } }