public class ApplicationStateManagerImpl extends Object implements ApplicationStateManager
Constructor and Description |
---|
ApplicationStateManagerImpl(Map<Class,ApplicationStateContribution> configuration,
ApplicationStatePersistenceStrategySource source,
ObjectLocator locator) |
Modifier and Type | Method and Description |
---|---|
<T> boolean |
exists(Class<T> ssoClass)
Returns true if the SSO already exists, false if it has not yet been created.
|
<T> T |
get(Class<T> ssoClass)
For a given class, find the SSO for the class, creating it if necessary.
|
<T> T |
getIfExists(Class<T> ssoClass)
For a given class, find the SSO for the class.
|
<T> void |
set(Class<T> ssoClass,
T sso)
Stores a new SSO, replacing the existing SSO (if any).
|
public ApplicationStateManagerImpl(Map<Class,ApplicationStateContribution> configuration, ApplicationStatePersistenceStrategySource source, ObjectLocator locator)
public <T> T get(Class<T> ssoClass)
ApplicationStateManager
ObjectLocator.autobuild(Class)
.
This
allows an SSO to keep references to Tapestry IoC services or other objects that can be injected.get
in interface ApplicationStateManager
ssoClass
- identifies the SSO to access or createpublic <T> T getIfExists(Class<T> ssoClass)
ApplicationStateManager
getIfExists
in interface ApplicationStateManager
ssoClass
- identifies the SSO to access or createpublic <T> void set(Class<T> ssoClass, T sso)
ApplicationStateManager
set
in interface ApplicationStateManager
ssoClass
- the type of SSOsso
- the SSO instancepublic <T> boolean exists(Class<T> ssoClass)
ApplicationStateManager
exists
in interface ApplicationStateManager
ssoClass
- used to select the SSO5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.