public class WebSession extends Session
clientInfo, SESSION_ATTRIBUTE_NAME
Constructor and Description |
---|
WebSession(Request request)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected String |
generateNewSessionId()
Change the id of the underlying (Web)Session.
|
static WebSession |
get() |
WebClientInfo |
getClientInfo()
Gets the client info object for this session.
|
void |
invalidate()
Call signOut() and remove the logon data from whereever they have been persisted (e.g.
|
protected WebPage |
newBrowserInfoPage()
Override this method if you want to use a custom page for gathering the client's browser
information.
The easiest way is just to extend BrowserInfoPage and provide your own markup file |
bind, changeSessionId, clear, debug, detach, dirty, dirty, endRequest, error, exists, fatal, getApplication, getAttribute, getAttributeNames, getAuthorizationStrategy, getClassResolver, getFeedbackMessages, getId, getLocale, getMetaData, getPageFactory, getPageManager, getSessionStore, getSizeInBytes, getStyle, info, internalDetach, invalidateNow, isSessionInvalidated, isTemporary, newPageAccessSynchronizer, nextPageId, nextSequenceValue, onEvent, onInvalidate, removeAttribute, replaceSession, setAttribute, setClientInfo, setLocale, setMetaData, setStyle, success, warn
public WebSession(Request request)
RequestCycle
is not available until this constructor returns.request
- The current requestpublic static WebSession get()
public void invalidate()
invalidate
in class Session
Session.invalidate()
public WebClientInfo getClientInfo()
Session.setClientInfo(ClientInfo)
)
client info object.
To gather the client information this implementation redirects temporarily to a special page
(BrowserInfoPage
).
Note: Do not call this method from your custom Session
constructor
because the temporary page needs a constructed Session
to be able to work.
If you need to set a default client info property then better use
Session.setClientInfo(org.apache.wicket.core.request.ClientInfo)
directly.
getClientInfo
in class Session
protected WebPage newBrowserInfoPage()
BrowserInfoPage
and provide your own markup fileWebPage
which should be used while gathering browser infoprotected String generateNewSessionId()
Session
generateNewSessionId
in class Session
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.