wicket.session
Interface ISessionStore

All Known Implementing Classes:
AbstractHttpSessionStore, HttpSessionStore, PortletSessionStore

public interface ISessionStore

The actual store that is used by Session to store its attributes.

Author:
Eelco Hillenius, Johan Compagner

Method Summary
 void bind(Request request, Session newSession)
          Adds the provided new session to this facade using the provided request.
 java.lang.Object getAttribute(Request request, java.lang.String name)
          Gets the attribute value with the given name
 java.util.List getAttributeNames(Request request)
           
 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.
 void removeAttribute(Request request, java.lang.String name)
          Removes the attribute with the given name.
 void setAttribute(Request request, java.lang.String name, java.lang.Object value)
          Adds or replaces the attribute with the given name and value.
 void unbind(java.lang.String sessionId)
          Adds the provided new session to this facade using the provided request.
 

Method Detail

getAttribute

java.lang.Object getAttribute(Request request,
                              java.lang.String name)
Gets the attribute value with the given name

Parameters:
request - the current request
name - The name of the attribute to store
Returns:
The value of the attribute

getAttributeNames

java.util.List getAttributeNames(Request request)
Parameters:
request - the current request
Returns:
List of attributes for this session

invalidate

void invalidate(Request request)
Invalidates the session.

Parameters:
request - the current request

removeAttribute

void removeAttribute(Request request,
                     java.lang.String name)
Removes the attribute with the given name.

Parameters:
request - the current request
name - the name of the attribute to remove

setAttribute

void setAttribute(Request request,
                  java.lang.String name,
                  java.lang.Object value)
Adds or replaces the attribute with the given name and value.

Parameters:
request - the current request
name - the name of the attribute
value - the value of the attribute

getSessionId

java.lang.String getSessionId(Request request)
Get the session id for the provided request.

Parameters:
request - The request
Returns:
The session id for the provided request

lookup

Session lookup(Request request)
Retrieves the session for the provided request from this facade.

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.

Parameters:
request - The current request
Returns:
The session for the provided request or null if the session was not bound

bind

void bind(Request request,
          Session newSession)
Adds the provided new session to this facade using the provided request.

Parameters:
request - The request that triggered making a new sesion
newSession - The new session

unbind

void unbind(java.lang.String sessionId)
Adds the provided new session to this facade using the provided request.

Parameters:
sessionId - The SessionId that must be unbinded.


Copyright © 2004-2008 Wicket developers. All Rights Reserved.