public interface ApplicationStatePersistenceStrategy
ApplicationStateManager
to manage a specific kind of Session State Object (SSO)
persistence. The
strategy is responsible for managing SSO instances within its domain.
NOTE: The term "Application" here is a hold-over from Tapestry 5.0, which used the @ApplicationState (deprecated and deleted) annotation, and called them "ASOs" (Application State Objects). This service would be better named "SessionStatePersistenceStrategy" (but renaming it would cause backwards compatibility issues).
Modifier and Type | Method and Description |
---|---|
<T> boolean |
exists(Class<T> ssoClass)
Returns true if the SSO already exists, false if null.
|
<T> T |
get(Class<T> ssoClass,
ApplicationStateCreator<T> creator)
Gets the SSO from the domain.
|
default <T> T |
getIfExists(Class<T> ssoClass)
Returns the SSO if it exists or null.
|
<T> void |
set(Class<T> ssoClass,
T sso)
Stores a new SSO, possibly replacing the existing one.
|
<T> T get(Class<T> ssoClass, ApplicationStateCreator<T> creator)
<T> void set(Class<T> ssoClass, T sso)
T
- ssoClass
- sso
- instance to store, or null to delete existingdefault <T> T getIfExists(Class<T> ssoClass)
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.