com.dyuproject.web
Class CookieSession

java.lang.Object
  extended by com.dyuproject.web.CookieSession
All Implemented Interfaces:
Serializable, org.mortbay.util.ajax.JSON.Convertible

public final class CookieSession
extends Object
implements Serializable, org.mortbay.util.ajax.JSON.Convertible

Session attribues being stored on the client cookie.

Author:
David Yu
See Also:
Serialized Form
Date created:
May 19, 2008

Field Summary
static String ATTR_NAME
           
 
Constructor Summary
CookieSession()
           
 
Method Summary
 void fromJSON(Map map)
           
 Object getAttribute(String name)
           
 Set<String> getAttributeNames()
           
 Map<String,Object> getAttributes()
           
 Map<String,Object> getAttrs()
           
 String getIP()
           
 long getTimeUpdated()
           
 boolean isPersisted()
           
 boolean removeAttribute(String name)
           
 void setAttribute(String name, Object value)
           
 void toJSON(org.mortbay.util.ajax.JSON.Output out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_NAME

public static final String ATTR_NAME
See Also:
Constant Field Values
Constructor Detail

CookieSession

public CookieSession()
Method Detail

setAttribute

public void setAttribute(String name,
                         Object value)
Parameters:
name -
value - can be any object/pojo.

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()

getTimeUpdated

public long getTimeUpdated()

isPersisted

public boolean isPersisted()

getIP

public String getIP()

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


Copyright © 2008-2013. All Rights Reserved.