|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RequestStorage
This allows access to values which are stored in the current request thread,
these values are inaccessible outside of a request and will be destroyed
when the thread ends
This also "magically" exposes all the values in the request (attributes and params)
as if they were stored in the map as well, if there are conflicts then locally stored data always wins
over data from the request
Standard reserved keys have values that are always available:
Locale
| Nested Class Summary | |
|---|---|
static class |
RequestStorage.RequestOrigin
Indicates the origin of the current request |
static class |
RequestStorage.ReservedKeys
Reserved keys with special data in them, see RequestStorage |
| Method Summary | ||
|---|---|---|
Map<String,Object> |
getStorageMapCopy()
Get the data as a map for easy access to the full set of keys/values, this is a copy and changing it has no effect on the data in the request |
|
Map<String,Object> |
getStorageMapCopy(boolean includeInternal,
boolean includeHeaders,
boolean includeParams,
boolean includeAttributes)
Special version which allows getting only the parts that are desired |
|
Object |
getStoredValue(String key)
Get a value that is stored in the request for a specific key |
|
|
getStoredValueAsType(Class<T> type,
String key)
|
|
| Method Detail |
|---|
Map<String,Object> getStorageMapCopy()
Map<String,Object> getStorageMapCopy(boolean includeInternal,
boolean includeHeaders,
boolean includeParams,
boolean includeAttributes)
includeInternal - include the internal request valuesincludeHeaders - include the request headersincludeParams - include the request parametersincludeAttributes - include the request attributes
Object getStoredValue(String key)
key - a key for a stored value
IllegalArgumentException - if the key is null
<T> T getStoredValueAsType(Class<T> type,
String key)
T - type - an object type to attempt to convert the object tokey - a key for the stored value
IllegalArgumentException - if the type or key is null
IllegalFormatConversionException - if the conversion cannot be completed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||