com.dyuproject.web
Class CookieSessionManager

java.lang.Object
  extended by com.dyuproject.web.CookieSessionManager

public class CookieSessionManager
extends Object

Manages the CookieSession. The environment is setup from a java.util.Properties and taking the valaues of session.* keys

Author:
David Yu

Field Summary
static String COOKIE_SESSION_REQUEST_ATTR
           
static String SESSION_COOKIE_DOMAIN
           
static String SESSION_COOKIE_INCLUDE_REMOTE_ADDRESS
           
static String SESSION_COOKIE_MAX_AGE
           
static String SESSION_COOKIE_NAME
           
static String SESSION_COOKIE_PATH
           
static String SESSION_COOKIE_SECRET_KEY
           
 
Constructor Summary
CookieSessionManager()
           
 
Method Summary
static CookieSession getCurrentSession()
           
 CookieSession getSession(HttpServletRequest request, boolean create)
           
 void init(Properties props)
           
 boolean invalidateSession(HttpServletResponse response)
           
 boolean persistSession(CookieSession session, HttpServletRequest request, HttpServletResponse response)
           
 void postHandle(HttpServletRequest request, HttpServletResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_COOKIE_SECRET_KEY

public static final String SESSION_COOKIE_SECRET_KEY
See Also:
Constant Field Values

SESSION_COOKIE_NAME

public static final String SESSION_COOKIE_NAME
See Also:
Constant Field Values

SESSION_COOKIE_MAX_AGE

public static final String SESSION_COOKIE_MAX_AGE
See Also:
Constant Field Values

SESSION_COOKIE_DOMAIN

public static final String SESSION_COOKIE_DOMAIN
See Also:
Constant Field Values

SESSION_COOKIE_PATH

public static final String SESSION_COOKIE_PATH
See Also:
Constant Field Values

SESSION_COOKIE_INCLUDE_REMOTE_ADDRESS

public static final String SESSION_COOKIE_INCLUDE_REMOTE_ADDRESS
See Also:
Constant Field Values

COOKIE_SESSION_REQUEST_ATTR

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

CookieSessionManager

public CookieSessionManager()
Method Detail

getCurrentSession

public static CookieSession getCurrentSession()

init

public void init(Properties props)

getSession

public CookieSession getSession(HttpServletRequest request,
                                boolean create)

persistSession

public boolean persistSession(CookieSession session,
                              HttpServletRequest request,
                              HttpServletResponse response)
                       throws IOException
Throws:
IOException

invalidateSession

public boolean invalidateSession(HttpServletResponse response)
                          throws IOException
Throws:
IOException

postHandle

public void postHandle(HttpServletRequest request,
                       HttpServletResponse response)
                throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.