org.apache.wicket.protocol.http
Interface SecondLevelCacheSessionStore.ISerializationAwarePageStore

All Superinterfaces:
SecondLevelCacheSessionStore.IPageStore
All Known Implementing Classes:
DiskPageStore
Enclosing class:
SecondLevelCacheSessionStore

public static interface SecondLevelCacheSessionStore.ISerializationAwarePageStore
extends SecondLevelCacheSessionStore.IPageStore

Some PageStores might want to preprocess page before serialization. For example if the PageStore serializes page, it might keep the serialized page during the request. So when the pagemap gets serialized (for session replication) in the request thread, the pagestore can provide the already serialized data.

Author:
Matej Knopp

Method Summary
 Page convertToPage(Object page)
           
 Serializable prepareForSerialization(String sessionId, Object page)
          Process the page before the it gets serialized.
 Object restoreAfterSerialization(Serializable serializable)
          This method should restore the serialized page to intermediate object that can be converted to real page instance using convertToPage(Object).
 
Methods inherited from interface org.apache.wicket.protocol.http.SecondLevelCacheSessionStore.IPageStore
containsPage, destroy, getPage, pageAccessed, removePage, storePage, unbind
 

Method Detail

prepareForSerialization

Serializable prepareForSerialization(String sessionId,
                                     Object page)
Process the page before the it gets serialized. The page can be either real page instance of object returned by restoreAfterSerialization(Serializable).

Parameters:
sessionId -
page -
Returns:
The Page itself or a SerializedContainer for that page

restoreAfterSerialization

Object restoreAfterSerialization(Serializable serializable)
This method should restore the serialized page to intermediate object that can be converted to real page instance using convertToPage(Object).

Parameters:
sessionId -
serializable -
Returns:
Page

convertToPage

Page convertToPage(Object page)
Parameters:
page -
Returns:
page


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