01: /*
02: * Created on Nov 12, 2005
03: */
04: package uk.org.ponder.rsf.state;
05:
06: import uk.org.ponder.rsf.preservation.StatePreservationStrategy;
07:
08: /** The repository of all inter-request state in RSF, certainly on the
09: * server side. Some client-side storage strategies may bypass TSH and
10: * simply implement {@link StatePreservationStrategy} directly. */
11: public interface TokenStateHolder {
12: /** Returns any TokenRequestState object with the specified ID.
13: * @return The required TRS object, or <code>null</code> if none is stored.
14: */
15: public Object getTokenState(String tokenID);
16:
17: /** Stores the supplied TokenRequestState object in the repository */
18: public void putTokenState(String tokenID, Object trs);
19:
20: /** Clear the token with supplied ID from state */
21: public void clearTokenState(String tokenID);
22:
23: /** Returns a (probably request-variable) key by which the specific
24: * storage for this TSH may be indexed.
25: */
26: public String getId();
27: }
|