|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The State interface defines a generic set of state information. States are retrieved from a StateManager, which is responsible for creating States, storing States, and deciding on a strategy for purging old states. The State interface itself is entirely immutable, but the MutableState subinterfaces adds mutability.
States are most useful for storing per-page state information. They can be directly set on a Page object using get/setState(). Developers must be careful, however, when setting a State object on a Page. That State object must have been created by the StateManager that hangs off the BajaContext.
State objects can also be used just by themselves as event tokens, to ensure that a page can only be submitted once.
State implementations are required to be threadsafe, and should be serializable.
Page.getState()
,
Page.setState(oracle.cabo.servlet.state.State)
Method Summary | |
void |
expire()
Invalidate this state object. |
java.lang.String |
getID()
Returns the ID of this state. |
StateManager |
getManager()
Gets the state manager that created and maintains this State. |
java.lang.Object |
getValue(java.lang.Object key)
Gets a value stored on the State. |
boolean |
isExpired()
Tests whether the State has been expired. |
java.util.Enumeration |
keys()
Returns an enumeration of value keys, or null if none have been added. |
Method Detail |
public void expire()
public boolean isExpired()
public java.lang.String getID()
public StateManager getManager()
public java.lang.Object getValue(java.lang.Object key)
MutableState.putValue(java.lang.Object, java.lang.Object)
public java.util.Enumeration keys()
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |