|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwicket.protocol.http.AbstractHttpSessionStore
public abstract class AbstractHttpSessionStore
Abstract implementation of ISessionStore that works with web
applications and that provided some speficic http servlet/ session related
functionality.
| Nested Class Summary | |
|---|---|
protected static class |
AbstractHttpSessionStore.SessionBindingListener
Reacts on unbinding from the session by cleaning up the session related application data. |
| Field Summary | |
|---|---|
protected WebApplication |
application
|
protected static org.apache.commons.logging.Log |
log
log. |
| Constructor Summary | |
|---|---|
AbstractHttpSessionStore()
Construct. |
|
| Method Summary | |
|---|---|
void |
bind(Request request,
Session newSession)
Adds the provided new session to this facade using the provided request. |
protected javax.servlet.http.HttpSession |
getHttpSession(WebRequest request)
Gets the underlying HttpSession object or null. |
java.lang.String |
getSessionId(Request request)
Get the session id for the provided request. |
void |
invalidate(Request request)
Invalidates the session. |
Session |
lookup(Request request)
Retrieves the session for the provided request from this facade. |
protected void |
onBind(Request request,
Session newSession)
Template method that is called when a session is being bound to the session store. |
protected void |
onUnbind(java.lang.String sessionId)
Template method that is called when the session is being detached from the store, which typically happens when the httpsession was invalidated. |
protected WebRequest |
toWebRequest(Request request)
Cast Request to WebRequest. |
void |
unbind(java.lang.String sessionId)
Adds the provided new session to this facade using the provided request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface wicket.session.ISessionStore |
|---|
getAttribute, getAttributeNames, removeAttribute, setAttribute |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
protected final WebApplication application
| Constructor Detail |
|---|
public AbstractHttpSessionStore()
| Method Detail |
|---|
public final void invalidate(Request request)
ISessionStore
invalidate in interface ISessionStorerequest - the current requestISessionStore.invalidate(Request)public final java.lang.String getSessionId(Request request)
ISessionStore
getSessionId in interface ISessionStorerequest - The request
ISessionStore.getSessionId(wicket.Request)
public final void bind(Request request,
Session newSession)
ISessionStore
bind in interface ISessionStorerequest - The request that triggered making a new sesionnewSession - The new sessionISessionStore.bind(wicket.Request, wicket.Session)public final void unbind(java.lang.String sessionId)
ISessionStore
unbind in interface ISessionStoresessionId - The SessionId that must be unbinded.ISessionStore.unbind(java.lang.String)public Session lookup(Request request)
ISessionStore
This method should return null if it is not bound yet, so that Wicket can
recognize that it should create a session and call
ISessionStore.bind(Request, Session) right after that.
lookup in interface ISessionStorerequest - The current request
ISessionStore.lookup(wicket.Request)protected final WebRequest toWebRequest(Request request)
Request to WebRequest.
request - The request to cast
protected final javax.servlet.http.HttpSession getHttpSession(WebRequest request)
WARNING: it is a bad idea to depend on the http session object directly. Please use the classes and methods that are exposed by Wicket instead. Send an email to the mailing list in case it is not clear how to do things or you think you miss funcionality which causes you to depend on this directly.
request -
protected void onBind(Request request,
Session newSession)
ISessionStore.setAttribute(Request, String, Object) with key
Session.SESSION_ATTRIBUTE_NAME.
request - The requestnewSession - The new sessionprotected void onUnbind(java.lang.String sessionId)
sessionId - The session id of the session that was invalidated.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||