use of org.apache.wicket.protocol.http.IRequestLogger in project wicket by apache.
the class HttpSessionStore method removeAttribute.
@Override
public final void removeAttribute(final Request request, final String name) {
HttpSession httpSession = getHttpSession(request, false);
if (httpSession != null) {
String attributeName = getSessionAttributePrefix(request) + name;
IRequestLogger logger = Application.get().getRequestLogger();
if (logger != null) {
Object value = httpSession.getAttribute(attributeName);
if (value != null) {
logger.objectRemoved(value);
}
}
httpSession.removeAttribute(attributeName);
}
}
use of org.apache.wicket.protocol.http.IRequestLogger in project wicket by apache.
the class HttpSessionStore method getSessionId.
@Override
public String getSessionId(final Request request, final boolean create) {
String id = null;
HttpSession httpSession = getHttpSession(request, false);
if (httpSession != null) {
id = httpSession.getId();
} else if (create) {
httpSession = getHttpSession(request, true);
id = httpSession.getId();
IRequestLogger logger = Application.get().getRequestLogger();
if (logger != null) {
logger.sessionCreated(id);
}
}
return id;
}
use of org.apache.wicket.protocol.http.IRequestLogger in project wicket by apache.
the class HttpSessionStore method setAttribute.
@Override
public final void setAttribute(final Request request, final String name, final Serializable value) {
// ignore call if the session was marked invalid
HttpSession httpSession = getHttpSession(request, false);
if (httpSession != null) {
String attributeName = getSessionAttributePrefix(request) + name;
IRequestLogger logger = Application.get().getRequestLogger();
if (logger != null) {
if (httpSession.getAttribute(attributeName) == null) {
logger.objectCreated(value);
} else {
logger.objectUpdated(value);
}
}
httpSession.setAttribute(attributeName, value);
}
}
use of org.apache.wicket.protocol.http.IRequestLogger in project wicket by apache.
the class LiveSessionsPage method getRequestLogger.
IRequestLogger getRequestLogger() {
WebApplication webApplication = (WebApplication) Application.get();
IRequestLogger requestLogger = webApplication.getRequestLogger();
if (requestLogger == null)
requestLogger = new RequestLogger();
return requestLogger;
}
use of org.apache.wicket.protocol.http.IRequestLogger in project wicket by apache.
the class RequestsPage method getRequestLogger.
IRequestLogger getRequestLogger() {
WebApplication webApplication = (WebApplication) Application.get();
IRequestLogger requestLogger = webApplication.getRequestLogger();
if (webApplication.getRequestLogger() == null)
requestLogger = new RequestLogger();
return requestLogger;
}
Aggregations