org.loom.servlet.scope
Class FlashContext
java.lang.Object
org.loom.servlet.scope.FlashContext
- All Implemented Interfaces:
- java.io.Serializable
public class FlashContext
- extends java.lang.Object
- implements java.io.Serializable
Contains objects stored in a flash scope.
A flash scope is like a request scope that is alive for two consecutive requests.
Objects stored in this context will be available for the next request.
The FlashContainer object is Serializable, but it does not enforce that its contents
are Serializable (adopting the same approach of 7.7.2 of the servlet 2.3 spec).
Note that this could be a problem when including not Serializable objects in a flash
context, if the server decides to serialize the session.
- See Also:
- Serialized Form
Method Summary |
boolean |
contains(java.lang.String key)
|
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
entrySet()
|
java.lang.Object |
getAttribute(java.lang.String key)
|
java.lang.String |
getId()
|
boolean |
isEmpty()
|
java.util.Set<java.lang.String> |
keySet()
|
void |
removeAttribute(java.lang.String name)
|
void |
setAttribute(java.lang.String key,
java.lang.Object value)
|
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FlashContext
public FlashContext(java.lang.String id)
setAttribute
public void setAttribute(java.lang.String key,
java.lang.Object value)
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
contains
public boolean contains(java.lang.String key)
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
isEmpty
public boolean isEmpty()
keySet
public java.util.Set<java.lang.String> keySet()
size
public int size()
getId
public java.lang.String getId()
removeAttribute
public void removeAttribute(java.lang.String name)