|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1.5.0) E10686-06 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StateManager
The base StateManager interface. The state manager is designed to manage state that describes "the circumstance or condition of a being or thing at any given time" [Webster's Revised Unabridged Dictionary].
ADF/J2EE state is generally implemented as a property of an object. The state property of an object is distinct from other properties of an object in that it is usually transient and not independently searchable.
ADF components will use the common state manager to load and store states during the lifetime of an application. This inteface defines operations similar to those found in the Map interface to get, put, and remove states.
Some ADF components may require that state is durable. Durable states are those that may survive abnormal events like system crash. The common state manager will support durable states by using a persistence service to read/write state to secondary storage.
Some ADF components may also requires that state is distributable. Distributable state is defined as being available on all nodes in a distributed system. The common state manager will support distributable states by using a distribution service to share states across nodes.
To access states, the common state manager requires that each state is uniquely identified by a state id and an ADF context.
The state id is to be defined by the ADF component. State ids must be unique for a context. Ids of persistent or distributable object must also be Serializable and consistent. Consistency requires that an identifier for a state is equal across processes.
The state context is to be defined as an ADF context. Examples may include BindingContext or session.
A default singleton state manager instance will be managed by the ADF framework. Most ADF components will access the state manager from a context DefaultContext
.
Method Summary | |
---|---|
void |
clearStates(java.lang.Object context) Removes all states for the specified conext. |
java.lang.Object |
getState(java.lang.Object context, java.lang.Object id) Returns the specified state. |
java.lang.Object |
getUserAttributes(java.lang.Object context, java.lang.Object id) Returns the user attributes of the specified state. |
void |
init(java.util.Hashtable env) Invoked by the DefaultContext when the StateManager is instantiated. |
java.util.Iterator |
listStateIds(java.lang.Object context) Returns an iterator of the save point Ids. |
java.lang.Object |
putState(java.lang.Object context, java.lang.Object id, java.lang.Object state) Registers a state. |
java.lang.Object |
putState(java.lang.Object context, java.lang.Object id, java.lang.Object state, Policy policy) Registers a state with a management policy. |
java.lang.Object |
putState(java.lang.Object context, java.lang.Object id, java.lang.Object state, Policy policy, java.lang.Object userAttrs) Registers a state with a management policy. |
java.lang.Object |
removeState(java.lang.Object context, java.lang.Object id) Removes the specified state. |
Method Detail |
---|
void init(java.util.Hashtable env)
DefaultContext
when the StateManager is instantiated. Custom implementations may use the environment to perform custom initialization of the StateManager implementation.env
- the default context environmentjava.lang.Object getState(java.lang.Object context, java.lang.Object id)
context
- the ADF context of the required stateid
- the state idjava.lang.Object putState(java.lang.Object context, java.lang.Object id, java.lang.Object state)
context
- the ADF context of the stateid
- the state idstate
- the statejava.lang.Object putState(java.lang.Object context, java.lang.Object id, java.lang.Object state, Policy policy)
context
- the ADF context of the stateid
- the state idstate
- the statepolicy
- the management policy.java.lang.Object removeState(java.lang.Object context, java.lang.Object id)
context
- the ADF context of the required stateid
- the state idvoid clearStates(java.lang.Object context)
context
- an ADF contextjava.lang.Object getUserAttributes(java.lang.Object context, java.lang.Object id)
context
- the ADF context of the required stateid
- the state idjava.util.Iterator listStateIds(java.lang.Object context)
context
- the ADF context of the required statejava.lang.Object putState(java.lang.Object context, java.lang.Object id, java.lang.Object state, Policy policy, java.lang.Object userAttrs)
context
- the ADF context of the stateid
- the state idstate
- the statepolicy
- the management policy.userAttrs
- user attributes to be associated with the state.
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1.5.0) E10686-06 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |