|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wicketstuff.shiro.wicket.page.store.SessionPageStore
public class SessionPageStore
An IPageStore
implementation that stores serialized Pages in JSecurity's
Session. This implementation exists to support
applications that use JSecurity's Enterprise Sessions instead of HTTP-only sessions.
DiskPageStore used by Wicket is
not suitable. Instead Page state must be serialized to a mechanism that is 'cluster-friendly'.
JSecurity's enterprise Sessions are cluster-friendly, so storing pages in the
Session is 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 the Session is clustered.
| Field Summary | |
|---|---|
protected static int |
DEFAULT_MAX_PAGES
|
| Constructor Summary | |
|---|---|
SessionPageStore()
|
|
SessionPageStore(int maxPageMapSize)
|
|
| Method Summary | |
|---|---|
boolean |
containsPage(String sessionId,
int pageId)
|
IManageablePage |
convertToPage(Object page)
|
protected IManageablePage |
deserializePage(byte[] data)
|
void |
destroy()
|
int |
getMaxPageMapSize()
|
Page |
getPage(String sessionId,
int pageId)
|
protected PageCacheManager |
getPageCacheManager(String sessionId)
|
protected org.apache.shiro.session.Session |
getSession(String sessionId)
|
protected org.apache.shiro.session.Session |
getSessionForUpdate(String sessionId)
|
void |
pageAccessed(String sessionId,
Page page)
|
Serializable |
prepareForSerialization(String sessionId,
Object page)
|
void |
removePage(String sessionId,
int pageId)
|
Object |
restoreAfterSerialization(Serializable serializable)
|
protected SerializedPageWrapper |
serialize(String sessionId,
IManageablePage page)
|
protected byte[] |
serializePage(String sessionId,
IManageablePage page)
|
void |
storePage(String sessionId,
IManageablePage page)
|
void |
unbind(String sessionId)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int DEFAULT_MAX_PAGES
| Constructor Detail |
|---|
public SessionPageStore()
public SessionPageStore(int maxPageMapSize)
| Method Detail |
|---|
public boolean containsPage(String sessionId,
int pageId)
public IManageablePage convertToPage(Object page)
convertToPage in interface IPageStoreprotected IManageablePage deserializePage(byte[] data)
public void destroy()
destroy in interface IPageStorepublic int getMaxPageMapSize()
public Page getPage(String sessionId,
int pageId)
getPage in interface IPageStoreprotected PageCacheManager getPageCacheManager(String sessionId)
protected org.apache.shiro.session.Session getSession(String sessionId)
protected org.apache.shiro.session.Session getSessionForUpdate(String sessionId)
public void pageAccessed(String sessionId,
Page page)
public Serializable prepareForSerialization(String sessionId,
Object page)
prepareForSerialization in interface IPageStore
public void removePage(String sessionId,
int pageId)
removePage in interface IPageStorepublic Object restoreAfterSerialization(Serializable serializable)
restoreAfterSerialization in interface IPageStore
protected SerializedPageWrapper serialize(String sessionId,
IManageablePage page)
protected byte[] serializePage(String sessionId,
IManageablePage page)
public void storePage(String sessionId,
IManageablePage page)
storePage in interface IPageStorepublic void unbind(String sessionId)
unbind in interface IPageStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||