org.apache.wicket.protocol.http.pagestore
Class AbstractPageStore
java.lang.Object
org.apache.wicket.protocol.http.pagestore.AbstractPageStore
- All Implemented Interfaces:
- SecondLevelCacheSessionStore.IPageStore
- Direct Known Subclasses:
- DiskPageStore, SimpleSynchronousFilePageStore
public abstract class AbstractPageStore
- extends Object
- implements SecondLevelCacheSessionStore.IPageStore
Abstract page store that implements the serialization logic so that the subclasses can
concentrate on actual storing of serialized page instances.
- Author:
- Matej Knopp
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPageStore
public AbstractPageStore()
serializePage
protected List<AbstractPageStore.SerializedPage> serializePage(Page page)
- Creates a list of
AbstractPageStore.SerializedPage
instances obtained from serializing the provided
page.
One page instance can be serialized to multiple AbstractPageStore.SerializedPage
instances, because
each referenced page is serialized separately and should also be separately saved On
deserialization wicket detects a page instance placeholder and loads the appropriate page.
As an example, when there is PageA that has a member variable of type PageB, serializing
instanceof PageA will result in a list of two AbstractPageStore.SerializedPage
instances, one for PageA
and another one for the referenced PageB.
- Parameters:
page
- page to be serialized
- Returns:
- list of
AbstractPageStore.SerializedPage
s
deserializePage
protected Page deserializePage(byte[] data,
int versionNumber)
- Creates a page instance from given byte array. Optionally gets the specified version of the
page.
- Parameters:
data
- Serialized page instance data as byte arrayversionNumber
- Requested page version or -1 if original version (the one serialized) should be
kept
- Returns:
- page instance
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.