com.marringtons.util
Class Session.Key
java.lang.Object
com.marringtons.util.Session.Key
- Enclosing class:
- Session
- public abstract static class Session.Key
- extends Object
Key is returned by Session factory methods to create a private static key
to keep in calling classes to provide class, package or global scope session
data. It is advisable to cache it as a static value of the
calling class since xxx.class is (surprisingly) a non-trivial
library operation using Class.forName (at least using the Sun 1.4
JVM).
public class Panel extends Page
{
protected void setup()
{
...
HashMap portals =
(HashMap) request.session.get( panelCacheKey);
...
}
private static final Session.Key panelCacheKey =
Session.classScope( Panel.class, "data", HashMap.class, true);
}
|
Field Summary |
String |
key
key used to retrieve this item |
Class |
valueClass
Class for the item - used to create when needed |
key
public String key
- key used to retrieve this item
valueClass
public Class valueClass
- Class for the item - used to create when needed
Session.Key
public Session.Key()
Copyright © 2005 Paul Marrington http://library.marringtons.com