com.dyuproject.web
Class CookieSession
java.lang.Object
com.dyuproject.web.CookieSession
- All Implemented Interfaces:
- org.mortbay.util.ajax.JSON.Convertible
public class CookieSession
- extends Object
- implements org.mortbay.util.ajax.JSON.Convertible
Session attribues being stored on the client cookie.
- Author:
- David Yu
CookieSession
public CookieSession()
setAttribute
public void setAttribute(String name,
Object value)
- Parameters:
name
- value
- The value should be a Map, Collection, String, Number(Long or Double) or
JSON.Convertible. You will get a ClassCastException from getAttribute(name) if the value was
not any of the specified objects.
The value could also be an array of the specified objects.
getAttribute
public Object getAttribute(String name)
getAttributeNames
public Set<String> getAttributeNames()
getAttributes
public Map<String,Object> getAttributes()
removeAttribute
public boolean removeAttribute(String name)
getAttrs
public Map<String,Object> getAttrs()
getTimeCreated
public long getTimeCreated()
getTimeUpdated
public long getTimeUpdated()
isPersisted
public boolean isPersisted()
fromJSON
public void fromJSON(Map map)
- Specified by:
fromJSON
in interface org.mortbay.util.ajax.JSON.Convertible
toJSON
public void toJSON(org.mortbay.util.ajax.JSON.Output out)
- Specified by:
toJSON
in interface org.mortbay.util.ajax.JSON.Convertible
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013. All Rights Reserved.