Example usage for org.apache.wicket.protocol.http IRequestLogger objectRemoved

List of usage examples for org.apache.wicket.protocol.http IRequestLogger objectRemoved

Introduction

In this page you can find the example usage for org.apache.wicket.protocol.http IRequestLogger objectRemoved.

Prototype

void objectRemoved(Object value);

Source Link

Document

Called to monitor removals of objects out of the ISessionStore

Usage

From source file:bugs.HttpSessionStoreModified.java

License:Apache License

/**
 * @see org.apache.wicket.session.ISessionStore#removeAttribute(org.apache.wicket.request.Request,
 *      java.lang.String)//  w ww  . j  av a2s.c om
 */
@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);
    }
}

From source file:com.mastfrog.acteur.wicket.ActeurSessionStore.java

License:Apache License

/**
 * @see//w w  w .  ja  va  2 s  .c o m
 * org.apache.wicket.session.ISessionStore#removeAttribute(org.apache.wicket.request.Request,
 * java.lang.String)
 */
@Override
public final void removeAttribute(final Request request, final String name) {
    SessionImpl 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);
    }
}