Package org.eclnt.jsfserver.util
Class CCStateManager
java.lang.Object
org.eclnt.jsfserver.base.faces.application.StateManager
org.eclnt.jsfserver.util.CCStateManager
State manager that is used within CaptainCasa. The situation is: CaptainCasa
components do not hold any state (aside technical state) on their owns, the full
application state is always referenced via expressions. Therefore the strategy is:
The view root is parked within the session state of the http session. Assuming that the next http request will hit the same virtual machine the view root will as consequence NOT be persisted all the time but is kept stable.
If case the session state is not available (e.g. due to session migration) the view root will be re-built out of the current page context.
What's the advantage? There is NO UIComponent state serialization with every roundtrip. So, the scenario is "optimal" if the session by default is kept up and running in a cerain application server node.
Whats's the disadvantage? If a session is migrated from one node to the next, then the current request that the user invoked will be lost (because there is no component tree to take over events and data changed - the tree is rebuilt in the rendering phase).
The view root is parked within the session state of the http session. Assuming that the next http request will hit the same virtual machine the view root will as consequence NOT be persisted all the time but is kept stable.
If case the session state is not available (e.g. due to session migration) the view root will be re-built out of the current page context.
What's the advantage? There is NO UIComponent state serialization with every roundtrip. So, the scenario is "optimal" if the session by default is kept up and running in a cerain application server node.
Whats's the disadvantage? If a session is migrated from one node to the next, then the current request that the user invoked will be lost (because there is no component tree to take over events and data changed - the tree is rebuilt in the rendering phase).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclnt.jsfserver.base.faces.application.StateManager
StateManager.SerializedView -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgetComponentStateToSave(FacesContext context) protected ObjectgetTreeStructureToSave(FacesContext context) booleanisSavingStateInClient(FacesContext context) protected voidrestoreComponentState(FacesContext context, UIViewRoot viewRoot, String renderKitId) protected UIViewRootrestoreTreeStructure(FacesContext context, String viewId, String renderKitId) restoreView(FacesContext context, String viewId, String renderKitId) saveSerializedView(FacesContext context) saveView(FacesContext context) voidwriteState(FacesContext context, Object state) voidwriteState(FacesContext context, StateManager.SerializedView state)
-
Constructor Details
-
CCStateManager
-
-
Method Details
-
restoreView
- Overrides:
restoreViewin classStateManager
-
saveView
- Overrides:
saveViewin classStateManager
-
isSavingStateInClient
- Overrides:
isSavingStateInClientin classStateManager
-
writeState
- Overrides:
writeStatein classStateManager- Throws:
IOException
-
writeState
- Overrides:
writeStatein classStateManager- Throws:
IOException
-
saveSerializedView
- Overrides:
saveSerializedViewin classStateManager
-
getTreeStructureToSave
- Overrides:
getTreeStructureToSavein classStateManager
-
getComponentStateToSave
- Overrides:
getComponentStateToSavein classStateManager
-
restoreTreeStructure
- Overrides:
restoreTreeStructurein classStateManager
-
restoreComponentState
- Overrides:
restoreComponentStatein classStateManager
-