public interface ISessionStore
Session to store its attributes.
This class is intended for internal framework use.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ISessionStore.BindListener
Listener invoked when session is bound.
|
static interface |
ISessionStore.UnboundListener
Listener invoked when session is unbound.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(Request request,
Session newSession)
Adds the provided new session to this facade using the provided request.
|
void |
destroy()
Called when the WebApplication is destroyed.
|
void |
flushSession(Request request,
Session session)
Flushes the session.
|
Serializable |
getAttribute(Request request,
String name)
Gets the attribute value with the given name
|
List<String> |
getAttributeNames(Request request) |
Set<ISessionStore.BindListener> |
getBindListeners() |
String |
getSessionId(Request request,
boolean create)
Get the session id for the provided request.
|
Set<ISessionStore.UnboundListener> |
getUnboundListener() |
void |
invalidate(Request request)
Invalidates the session.
|
Session |
lookup(Request request)
Retrieves the session for the provided request from this facade.
|
void |
registerBindListener(ISessionStore.BindListener listener)
Registers listener invoked when session is bound.
|
void |
registerUnboundListener(ISessionStore.UnboundListener listener)
Registers listener invoked when session is unbound.
|
void |
removeAttribute(Request request,
String name)
Removes the attribute with the given name.
|
void |
setAttribute(Request request,
String name,
Serializable value)
Adds or replaces the attribute with the given name and value.
|
void |
unregisterBindListener(ISessionStore.BindListener listener)
Unregisters listener invoked when session is bound.
|
void |
unregisterUnboundListener(ISessionStore.UnboundListener listener)
Unregisters listener invoked when session is unbound.
|
Serializable getAttribute(Request request, String name)
request - the current requestname - The name of the attribute to storeList<String> getAttributeNames(Request request)
request - the current requestvoid setAttribute(Request request, String name, Serializable value)
request - the current requestname - the name of the attributevalue - the value of the attributevoid removeAttribute(Request request, String name)
request - the current requestname - the name of the attribute to removevoid invalidate(Request request)
request - the current requestString getSessionId(Request request, boolean create)
request - The requestcreate - Whether to create an actual session (typically an instance of HttpSession)
when not already done soSession lookup(Request request)
This method should return null if it is not bound yet, so that Wicket can recognize that it
should create a session and call bind(Request, Session) right after that.
request - The current requestvoid bind(Request request, Session newSession)
request - The request that triggered making a new sessionnewSession - The new sessionvoid flushSession(Request request, Session session)
String attr=getSessionAttributeName();
Session session=getAttribute(attr);
setAttribute(attr, session);
If the session is not yet bound it will be.request - current requestsession - session to be flushedvoid destroy()
void registerUnboundListener(ISessionStore.UnboundListener listener)
listener - void unregisterUnboundListener(ISessionStore.UnboundListener listener)
listener - Set<ISessionStore.UnboundListener> getUnboundListener()
void registerBindListener(ISessionStore.BindListener listener)
listener - void unregisterBindListener(ISessionStore.BindListener listener)
listener - Set<ISessionStore.BindListener> getBindListeners()
Copyright © 2006–2014 Apache Software Foundation. All rights reserved.