Example usage for org.apache.wicket.session ISessionStore lookup

List of usage examples for org.apache.wicket.session ISessionStore lookup

Introduction

In this page you can find the example usage for org.apache.wicket.session ISessionStore lookup.

Prototype

Session lookup(Request request);

Source Link

Document

Retrieves the session for the provided request from this facade.

Usage

From source file:com.servoy.j2db.server.headlessclient.WebClientsApplication.java

License:Open Source License

@SuppressWarnings("nls")
@Override//from w w  w. j  ava  2 s  .c  om
public synchronized Session newSession(Request request, Response response) {
    ISessionStore sessionStore = getSessionStore();
    Session session = sessionStore.lookup(request);
    if (session == null) {
        IWebClientSessionFactory webClientSessionFactory = ApplicationServerRegistry.get()
                .getWebClientSessionFactory();
        if (webClientSessionFactory == null) {
            throw new IllegalStateException("Server was not started for web client usage");
        }
        session = webClientSessionFactory.newSession(request, response);
        session.bind();
    }
    return session;
}

From source file:org.efaps.mobile.wicket.request.MobileRequestCycleListener.java

License:Apache License

/**
 * Method to get the EFapsSession./*from w  w  w .ja  v  a 2s .co m*/
 *
 * @param _request Request the Session is wanted for
 * @return EFapsSession
 */
private MobileSession getEFapsSession(final Request _request) {
    final ISessionStore sessionStore = WebApplication.get().getSessionStore();
    final MobileSession session = (MobileSession) sessionStore.lookup(_request);
    return session;
}

From source file:org.efaps.ui.wicket.request.EFapsRequestCycleListener.java

License:Apache License

/**
 * Method to get the EFapsSession./*  w ww . jav a2 s .  com*/
 *
 * @param _request Request the Session is wanted for
 * @return EFapsSession
 */
private EFapsSession getEFapsSession(final Request _request) {
    final ISessionStore sessionStore = WebApplication.get().getSessionStore();
    final EFapsSession session = (EFapsSession) sessionStore.lookup(_request);
    return session;
}