org.apache.wicket.protocol.http
Class SecondLevelCacheSessionStore

java.lang.Object
  extended by org.apache.wicket.protocol.http.AbstractHttpSessionStore
      extended by org.apache.wicket.protocol.http.HttpSessionStore
          extended by org.apache.wicket.protocol.http.SecondLevelCacheSessionStore
All Implemented Interfaces:
ISessionStore

public class SecondLevelCacheSessionStore
extends HttpSessionStore

FIXME document me!

Author:
jcompagner

Nested Class Summary
static interface SecondLevelCacheSessionStore.IClusteredPageStore
          Marker interface for PageStores that support replication of serialized pages across cluster, which means that the lastPage attribute of SecondLevelCachePageMap does not have to be serialized;
static interface SecondLevelCacheSessionStore.IPageStore
          This interface is used by the SecondLevelCacheSessionStore so that pages can be stored to a persistent layer.
static interface SecondLevelCacheSessionStore.ISerializationAwarePageStore
          Some PageStores might want to preprocess page before serialization.
 
Nested classes/interfaces inherited from class org.apache.wicket.protocol.http.AbstractHttpSessionStore
AbstractHttpSessionStore.SessionBindingListener
 
Field Summary
 
Fields inherited from class org.apache.wicket.protocol.http.AbstractHttpSessionStore
application
 
Constructor Summary
SecondLevelCacheSessionStore(Application application, SecondLevelCacheSessionStore.IPageStore pageStore)
          Construct.
 
Method Summary
 IPageMap createPageMap(java.lang.String name)
           
 void destroy()
          Called when the WebApplication is destroyed.
 SecondLevelCacheSessionStore.IPageStore getStore()
           
static java.lang.ThreadLocal getUsedPages()
           
 IPageVersionManager newVersionManager(Page page)
           
 void onEndRequest(Request request)
          Noop implementation.
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.
 void setAttribute(Request request, java.lang.String name, java.lang.Object value)
          Adds or replaces the attribute with the given name and value.
 
Methods inherited from class org.apache.wicket.protocol.http.HttpSessionStore
getAttribute, getAttributeNames, removeAttribute
 
Methods inherited from class org.apache.wicket.protocol.http.AbstractHttpSessionStore
bind, createPageMap, getHttpSession, getSessionId, invalidate, lookup, onBeginRequest, onBind, toWebRequest, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecondLevelCacheSessionStore

public SecondLevelCacheSessionStore(Application application,
                                    SecondLevelCacheSessionStore.IPageStore pageStore)
Construct.

Parameters:
application - The application for this store
pageStore - Page store for keeping page versions
Method Detail

getUsedPages

public static java.lang.ThreadLocal getUsedPages()
Returns:

createPageMap

public IPageMap createPageMap(java.lang.String name)
Specified by:
createPageMap in interface ISessionStore
Overrides:
createPageMap in class HttpSessionStore
Returns:
The pagemap instance
See Also:
AbstractHttpSessionStore.createPageMap(java.lang.String, org.apache.wicket.Session)

onEndRequest

public void onEndRequest(Request request)
Description copied from class: AbstractHttpSessionStore
Noop implementation. Clients can override this method.

Specified by:
onEndRequest in interface ISessionStore
Overrides:
onEndRequest in class AbstractHttpSessionStore
Parameters:
request - The request
See Also:
AbstractHttpSessionStore.onEndRequest(org.apache.wicket.Request)

destroy

public void destroy()
Description copied from interface: ISessionStore
Called when the WebApplication is destroyed.

Specified by:
destroy in interface ISessionStore
Overrides:
destroy in class AbstractHttpSessionStore
See Also:
AbstractHttpSessionStore.destroy()

getStore

public SecondLevelCacheSessionStore.IPageStore getStore()
Returns:
The store to use

newVersionManager

public IPageVersionManager newVersionManager(Page page)
Specified by:
newVersionManager in interface ISessionStore
Overrides:
newVersionManager in class AbstractHttpSessionStore
Parameters:
page - The page for which this version manager must be created
Returns:
A instance of a IPageVersionManager that the page will use.
See Also:
AbstractHttpSessionStore.newVersionManager(org.apache.wicket.Page)

setAttribute

public void setAttribute(Request request,
                         java.lang.String name,
                         java.lang.Object value)
Description copied from interface: ISessionStore
Adds or replaces the attribute with the given name and value.

Specified by:
setAttribute in interface ISessionStore
Overrides:
setAttribute in class HttpSessionStore
Parameters:
request - the current request
name - the name of the attribute
value - the value of the attribute
See Also:
ISessionStore.setAttribute(org.apache.wicket.Request, java.lang.String, java.lang.Object)

onUnbind

protected void onUnbind(java.lang.String sessionId)
Description copied from class: AbstractHttpSessionStore
Template method that is called when the session is being detached from the store, which typically happens when the httpsession was invalidated.

Overrides:
onUnbind in class AbstractHttpSessionStore
Parameters:
sessionId - The session id of the session that was invalidated.
See Also:
AbstractHttpSessionStore.onUnbind(java.lang.String)


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