Class SessionPageStore
- java.lang.Object
-
- org.apache.wicket.pageStore.AbstractPersistentPageStore
-
- org.wicketstuff.shiro.wicket.page.store.SessionPageStore
-
- All Implemented Interfaces:
IPageStore
public class SessionPageStore extends AbstractPersistentPageStore
AnIPageStoreimplementation that stores serialized Pages in JSecurity'sSession. This implementation exists to support applications that use JSecurity's Enterprise Sessions instead of HTTP-only sessions. In a distributed application, the JSecurity Session data might not reside on the same host that runs the Wicket application. In these cases the defaultDiskPageStoreused by Wicket is not suitable. Instead Page state must be serialized to a mechanism that is 'cluster-friendly'. JSecurity's enterpriseSessions are cluster-friendly, so storing pages in theSessionis a good choice. This means applications can utilize true generic load balancing and do not need sticky sessions - the Wicket PageMap can be updated on one host which is then available for any next load-balanced request on another host because theSessionis clustered.- Author:
- Les Hazlewood, Sebastian Thomschke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.wicket.pageStore.AbstractPersistentPageStore
AbstractPersistentPageStore.PersistedPage
-
-
Field Summary
Fields Modifier and Type Field Description protected static intDEFAULT_MAX_PAGES
-
Constructor Summary
Constructors Constructor Description SessionPageStore(String applicationName)SessionPageStore(String applicationName, int maxPageMapSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddPersistedPage(String sessionIdentifier, IManageablePage page)intgetMaxPageMapSize()protected PageCacheManagergetPageCacheManager(org.apache.shiro.session.Session session)protected IManageablePagegetPersistedPage(String sessionIdentifier, int pageId)protected org.apache.shiro.session.SessiongetSession(String sessionIdentifier, boolean create)protected voidremoveAllPersistedPages(String sessionIdentifier)protected voidremovePersistedPage(String sessionIdentifier, IManageablePage page)booleansupportsVersioning()-
Methods inherited from class org.apache.wicket.pageStore.AbstractPersistentPageStore
addPage, canBeAsynchronous, createSessionIdentifier, destroy, getPage, getSessionIdentifier, removeAllPages, removePage
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.pageStore.IPageStore
detach, end, revertPage
-
-
-
-
Field Detail
-
DEFAULT_MAX_PAGES
protected static final int DEFAULT_MAX_PAGES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMaxPageMapSize
public int getMaxPageMapSize()
-
supportsVersioning
public boolean supportsVersioning()
-
getPersistedPage
protected IManageablePage getPersistedPage(String sessionIdentifier, int pageId)
- Specified by:
getPersistedPagein classAbstractPersistentPageStore
-
removePersistedPage
protected void removePersistedPage(String sessionIdentifier, IManageablePage page)
- Specified by:
removePersistedPagein classAbstractPersistentPageStore
-
addPersistedPage
protected void addPersistedPage(String sessionIdentifier, IManageablePage page)
- Specified by:
addPersistedPagein classAbstractPersistentPageStore
-
removeAllPersistedPages
protected void removeAllPersistedPages(String sessionIdentifier)
- Specified by:
removeAllPersistedPagesin classAbstractPersistentPageStore
-
getPageCacheManager
protected PageCacheManager getPageCacheManager(org.apache.shiro.session.Session session)
-
getSession
protected org.apache.shiro.session.Session getSession(String sessionIdentifier, boolean create)
-
-