Package org.apache.wicket
Class DefaultPageManagerProvider
- java.lang.Object
-
- org.apache.wicket.DefaultPageManagerProvider
-
- All Implemented Interfaces:
Supplier<IPageManager>
,IPageManagerProvider
public class DefaultPageManagerProvider extends Object implements IPageManagerProvider
A provider of aPageManager
managing @link IManageablePage}s with a default chain ofIPageStore
s:RequestPageStore
keeping pages until end of the requestCachingPageStore
caching with an ...InSessionPageStore
keeping the last accessed page in the sessionSerializingPageStore
serializing all pages (so they are available for back-button)AsynchronousPageStore
moving storage of pages to an asynchronous worker thread (enabled by default withStoreSettings.isAsynchronous()
)CryptingPageStore
encrypting all pages (disabled by default inStoreSettings.isEncrypted()
)DiskPageStore
persisting all pages, configured according toStoreSettings
RequestPageStore
keeping pages until end of the requestCachingPageStore
caching with an ...InSessionPageStore
keeping the last accessed page in the sessionSerializingPageStore
serializing all pages (so they are available for back-button)AsynchronousPageStore
moving storage of pages to a worker threadInMemoryPageStore
keeping all pages in memory
RequestPageStore
caching pages until end of the requestInSessionPageStore
keeping a limited count of pages in the session, e.g. 10
RequestPageStore
, buffering all adding of pages until the end of the request. Several stores acceptSerializedPage
only, these have to be preceded by aSerializingPageStore
.For back-button support at least one store in the chain must create copies of stored pages (usually through serialization), otherwise any following request will work on an identical page instance and the previous state of page is no longer accessible.
Other stores be may inserted ad libitum, e.g.
NoopPageStore
discards all pagesGroupingPageStore
groups pages, e.g. to limit storage size on a per-group basisFilePageStore
as an alternative to the trustedDiskPageStore
- other implementations from wicketstuff-datastores
-
-
Field Summary
Fields Modifier and Type Field Description protected Application
application
-
Constructor Summary
Constructors Constructor Description DefaultPageManagerProvider(Application application)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPageManager
get()
protected ISerializer
getSerializer()
Get theISerializer
to use for serializing of pages.protected IPageStore
newAsynchronousStore(IPageStore pageStore)
Store pages asynchronously into the persistent store, if enabled inStoreSettings.isAsynchronous()
.protected IPageStore
newCachingStore(IPageStore pageStore)
Cache last page non-serialized in the session for fast access.protected IPageStore
newCryptingStore(IPageStore pageStore)
Crypt all pages, if enabled inStoreSettings.isEncrypted()
.protected IPageStore
newPersistentStore()
Keep persistent copies of all pages on disk.protected IPageStore
newRequestStore(IPageStore pageStore)
Keep pages in the request until it is finished.protected IPageStore
newSerializingStore(IPageStore pageStore)
Serialize pages.
-
-
-
Field Detail
-
application
protected final Application application
-
-
Constructor Detail
-
DefaultPageManagerProvider
public DefaultPageManagerProvider(Application application)
Constructor.- Parameters:
application
- The application instance
-
-
Method Detail
-
get
public IPageManager get()
- Specified by:
get
in interfaceSupplier<IPageManager>
-
getSerializer
protected ISerializer getSerializer()
Get theISerializer
to use for serializing of pages.By default the serializer of the applications
FrameworkSettings
.- Returns:
- how to serialize pages if needed for any
IPageStore
- See Also:
FrameworkSettings.getSerializer()
-
newRequestStore
protected IPageStore newRequestStore(IPageStore pageStore)
Keep pages in the request until it is finished.- See Also:
RequestPageStore
-
newCachingStore
protected IPageStore newCachingStore(IPageStore pageStore)
Cache last page non-serialized in the session for fast access.On session serialization the cached page will be dropped and re-acquired from a persistent store.
- See Also:
InSessionPageStore
-
newAsynchronousStore
protected IPageStore newAsynchronousStore(IPageStore pageStore)
Store pages asynchronously into the persistent store, if enabled inStoreSettings.isAsynchronous()
.- See Also:
AsynchronousPageStore
-
newSerializingStore
protected IPageStore newSerializingStore(IPageStore pageStore)
Serialize pages.- See Also:
SerializingPageStore
-
newCryptingStore
protected IPageStore newCryptingStore(IPageStore pageStore)
Crypt all pages, if enabled inStoreSettings.isEncrypted()
.- See Also:
CryptingPageStore
-
newPersistentStore
protected IPageStore newPersistentStore()
Keep persistent copies of all pages on disk.
-
-