org.apache.wicket.protocol.http
Class WebSession

java.lang.Object
  extended by org.apache.wicket.Session
      extended by org.apache.wicket.protocol.http.WebSession
All Implemented Interfaces:
java.io.Serializable, IClusterable
Direct Known Subclasses:
AuthenticatedWebSession, HangmanSession, RolesSession

public class WebSession
extends Session

A session subclass for the HTTP protocol.

Author:
Jonathan Locke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.wicket.Session
SESSION_ATTRIBUTE_NAME
 
Constructor Summary
WebSession(Request request)
          Constructor.
 
Method Summary
 boolean authenticate(java.lang.String username, java.lang.String password)
          Note: You must subclass WebSession and implement your own.
protected  void cleanupComponentFeedbackMessages()
          Clear all feedback messages
 void cleanupFeedbackMessages()
          Cleans up all rendered feedback messages and any unrendered, dangling feedback messages there may be left after that.
 void invalidate()
          Call signOut() and remove the logon data from whereever they have been persisted (e.g.
 
Methods inherited from class org.apache.wicket.Session
attach, bind, clear, detach, dirty, error, exists, get, getApplication, getAttribute, getAttributeNames, getAuthorizationStrategy, getClassResolver, getClientInfo, getFeedbackMessages, getId, getLocale, getMetaData, getPageFactory, getPageManager, getSessionStore, getSizeInBytes, getStyle, info, invalidateNow, isCurrentRequestValid, isSessionInvalidated, isTemporary, nextPageId, nextSequenceValue, removeAttribute, replaceSession, setAttribute, setClientInfo, setLocale, setMetaData, setStyle, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSession

public WebSession(Request request)
Constructor. Note that RequestCycle is not available until this constructor returns.

Parameters:
request - The current request
Method Detail

cleanupFeedbackMessages

public void cleanupFeedbackMessages()
Description copied from class: Session
Cleans up all rendered feedback messages and any unrendered, dangling feedback messages there may be left after that.

Specified by:
cleanupFeedbackMessages in class Session
See Also:
Session.cleanupFeedbackMessages()

cleanupComponentFeedbackMessages

protected void cleanupComponentFeedbackMessages()
Clear all feedback messages


invalidate

public void invalidate()
Call signOut() and remove the logon data from whereever they have been persisted (e.g. Cookies)

Overrides:
invalidate in class Session
See Also:
Session.invalidate()

authenticate

public boolean authenticate(java.lang.String username,
                            java.lang.String password)
Note: You must subclass WebSession and implement your own. We didn't want to make it abstract to force every application to implement it. Instead we throw an exception.

Parameters:
username - The username
password - The password
Returns:
True if the user was authenticated successfully


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.