public abstract class StateManager extends Object
Modifier | Constructor and Description |
---|---|
protected |
StateManager() |
Modifier and Type | Method and Description |
---|---|
void |
clear(String name)
Clears the state bean.
|
static StateManager |
get()
Returns the singleton instance.
|
<T> void |
get(String name,
Class<T> stateBeanType,
<any> callback)
Returns a state bean.
|
<S> S |
getDefaultStateInstance(Class<S> stateType)
Returns the default state instance.
|
Provider |
getProvider()
Returns the manager's state provider.
|
protected abstract AutoBeanFactory |
getStateBeanFactory()
Return the state bean factory responsible for creating and decoding the state beans.
|
<T> void |
set(String name,
T stateBean)
Sets a state bean.
|
void |
setProvider(Provider stateProvider)
Sets the manager's state provider.
|
public static StateManager get()
public void clear(String name)
name
- the bean namepublic <T> void get(String name, Class<T> stateBeanType, <any> callback)
T
- the state bean typename
- the bean namestateBeanType
- the state bean classcallback
- the callbackpublic <S> S getDefaultStateInstance(Class<S> stateType)
S
- the state typestateType
- the state classpublic Provider getProvider()
public <T> void set(String name, T stateBean)
T
- the state bean typename
- the bean namestateBean
- the state beanpublic void setProvider(Provider stateProvider)
stateProvider
- the providerprotected abstract AutoBeanFactory getStateBeanFactory()
Copyright © 2018. All rights reserved.