@Override protected ISessionStore newSessionStore() { // Don't use a filestore, or we spawn lots of threads, which makes // things slow. return new HttpSessionStore(this); }
/** * @see org.apache.wicket.session.ISessionStore#getAttribute(org.apache.wicket.Request, * java.lang.String) */ public Object getAttribute(Request request, String name) { WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { return httpSession.getAttribute(getSessionAttributePrefix(webRequest) + name); } return null; }
/** * @see org.apache.wicket.protocol.http.AbstractHttpSessionStore#onEndRequest(org.apache.wicket.Request) */ @Override public void onEndRequest(Request request) { super.onEndRequest(request); }
/** * @see org.apache.wicket.session.ISessionStore#removeAttribute(Request,java.lang.String) */ public void removeAttribute(Request request, String name) { // ignore call if the session was marked invalid if (!isSessionValid()) { return; } WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { String attributeName = getSessionAttributePrefix(webRequest) + name; IRequestLogger logger = application.getRequestLogger(); if (logger != null) { Object value = httpSession.getAttribute(attributeName); if (value != null) { logger.objectRemoved(value); } } httpSession.removeAttribute(attributeName); } }
/** * @see org.apache.wicket.session.ISessionStore#setAttribute(org.apache.wicket.Request, * java.lang.String, java.lang.Object) */ public void setAttribute(Request request, String name, Object value) { // ignore all pages, they are stored through the pagemap if (!(value instanceof Page)) { super.setAttribute(request, name, value); } }
/** * @see org.apache.wicket.protocol.http.AbstractHttpSessionStore#destroy() */ public void destroy() { super.destroy(); getStore().destroy(); }
/** * @see org.apache.wicket.session.ISessionStore#removeAttribute(Request,java.lang.String) */ public void removeAttribute(Request request, String name) { // ignore call if the session was marked invalid if (!isSessionValid()) { return; } WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { String attributeName = getSessionAttributePrefix(webRequest) + name; IRequestLogger logger = application.getRequestLogger(); if (logger != null) { Object value = httpSession.getAttribute(attributeName); if (value != null) { logger.objectRemoved(value); } } httpSession.removeAttribute(attributeName); } }
/** * @see org.apache.wicket.session.ISessionStore#setAttribute(org.apache.wicket.Request, * java.lang.String, java.lang.Object) */ @Override public void setAttribute(Request request, String name, Object value) { // ignore all pages, they are stored through the pagemap if (!(value instanceof Page)) { super.setAttribute(request, name, value); } }
/** * @see org.apache.wicket.protocol.http.AbstractHttpSessionStore#destroy() */ @Override public void destroy() { super.destroy(); getStore().destroy(); }
if (!isSessionValid()) WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) String attributeName = getSessionAttributePrefix(webRequest) + name; if (logger != null)
/** * @see org.apache.wicket.session.ISessionStore#getAttribute(org.apache.wicket.Request, * java.lang.String) */ public Object getAttribute(Request request, String name) { WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { return httpSession.getAttribute(getSessionAttributePrefix(webRequest) + name); } return null; }
protected ISessionStore newSessionStore() { // Don't use a filestore, or we spawn lots of threads, which makes // things slow. return new HttpSessionStore(this); }
/** * @see org.apache.wicket.protocol.http.AbstractHttpSessionStore#onEndRequest(org.apache.wicket.Request) */ public void onEndRequest(Request request) { super.onEndRequest(request); usedPages.set(null); }
if (!isSessionValid()) WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) String attributeName = getSessionAttributePrefix(webRequest) + name; if (logger != null)
/** * @see org.apache.wicket.session.ISessionStore#getAttributeNames(Request) */ public List<String> getAttributeNames(Request request) { List<String> list = new ArrayList<String>(); WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { @SuppressWarnings("unchecked") final Enumeration<String> names = httpSession.getAttributeNames(); final String prefix = getSessionAttributePrefix(webRequest); while (names.hasMoreElements()) { final String name = names.nextElement(); if (name.startsWith(prefix)) { list.add(name.substring(prefix.length())); } } } return list; }
@Override protected ISessionStore newSessionStore() { // Don't use a filestore, or we spawn lots of threads, which // makes things slow. return new HttpSessionStore(this); }
/** * @see org.apache.wicket.session.ISessionStore#getAttributeNames(Request) */ public List getAttributeNames(Request request) { List list = new ArrayList(); WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { final Enumeration names = httpSession.getAttributeNames(); final String prefix = getSessionAttributePrefix(webRequest); while (names.hasMoreElements()) { final String name = (String)names.nextElement(); if (name.startsWith(prefix)) { list.add(name.substring(prefix.length())); } } } return list; }
@Override protected ISessionStore newSessionStore() { // Don't use a filestore, or we spawn lots of threads, which makes // things slow. return new HttpSessionStore(this); }
@Override protected ISessionStore newSessionStore() { // Don't use a filestore, or we spawn lots of threads, which // makes things slow. return new HttpSessionStore(this); }
protected ISessionStore newSessionStore() { // Don't use a filestore, or we spawn lots of threads, which // makes things slow. return new HttpSessionStore(this); }