|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jcs.utils.servlet.session.DistSession
DistSession uses the CompositeCache and GroupCache to create a failover-safe distributed session.
| Field Summary | |
private javax.servlet.ServletContext |
context
|
private boolean |
isNew
|
private boolean |
isValid
|
private static org.apache.commons.logging.Log |
log
|
private static boolean |
REMOVE_ATTR_INVOCATION
|
private GroupCacheAccess |
sessCache
|
private SessionInfo |
sessInfo
|
private java.lang.String |
session_id
|
private static boolean |
SET_ATTR_INVOCATION
|
| Fields inherited from interface org.apache.jcs.utils.servlet.session.ISessionConstants |
DFLT_INACTIVE_INTERVAL, SESS_CACHE_NAME, SESS_CACHE_SIZE, SESS_INFO_CACHE_NAME, SESS_INFO_CACHE_SIZE |
| Constructor Summary | |
DistSession()
Constructor for a new instance with no ServletContext. |
|
DistSession(javax.servlet.ServletContext context)
Creates a new instance with the specified ServletContext. |
|
| Method Summary | |
void |
access()
Update the last access time. |
void |
clean()
Clears the session information. |
java.lang.Object |
getAttribute(java.lang.String name)
Gets the attribute attribute of the DistSession object |
java.util.Enumeration |
getAttributeNames()
Gets the attributeNames attribute of the DistSession object |
long |
getCreationTime()
Gets the creationTime attribute of the DistSession object |
java.lang.String |
getId()
Gets the id attribute of the DistSession object |
long |
getLastAccessedTime()
Gets the lastAccessedTime attribute of the DistSession object |
int |
getMaxInactiveInterval()
Gets the maxInactiveInterval attribute of the DistSession object |
javax.servlet.ServletContext |
getServletContext()
Returns a reference to the ServletContext this session is a
part of. |
javax.servlet.http.HttpSessionContext |
getSessionContext()
Deprecated. As of Version 2.1, this method is deprecated and has no replacement. It will be removed in a future version of the Java Servlet API. |
java.lang.Object |
getValue(java.lang.String name)
Gets the value attribute of the DistSession object |
java.lang.String[] |
getValueNames()
Gets the valueNames attribute of the DistSession object |
boolean |
init(java.lang.String session_id)
Initialization for an existing session. |
void |
initNew()
Initialization for a new session. |
void |
invalidate()
Description of the Method |
boolean |
isNew()
Gets the new attribute of the DistSession object |
void |
putValue(java.lang.String name,
java.lang.Object value)
Description of the Method |
void |
removeAttribute(java.lang.String name)
Description of the Method |
private void |
removeAttribute(java.lang.String name,
boolean invocation)
Description of the Method |
void |
removeValue(java.lang.String name)
Description of the Method |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets the attribute attribute of the DistSession object |
void |
setMaxInactiveInterval(int i)
Sets the maxInactiveInterval attribute of the DistSession object |
java.lang.String |
toString()
Description of the Method |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final org.apache.commons.logging.Log log
private static boolean SET_ATTR_INVOCATION
private static boolean REMOVE_ATTR_INVOCATION
private javax.servlet.ServletContext context
private java.lang.String session_id
private SessionInfo sessInfo
private GroupCacheAccess sessCache
private boolean isNew
private boolean isValid
| Constructor Detail |
public DistSession()
ServletContext. This
method will eventually be deprecated in favor of
DistSession(ServletContext).
public DistSession(javax.servlet.ServletContext context)
ServletContext.
context - | Method Detail |
public boolean init(java.lang.String session_id)
public void initNew()
public void clean()
public javax.servlet.ServletContext getServletContext()
ServletContext this session is a
part of.
public java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.servlet.http.HttpSessionpublic java.util.Enumeration getAttributeNames()
getAttributeNames in interface javax.servlet.http.HttpSessionpublic long getCreationTime()
getCreationTime in interface javax.servlet.http.HttpSessionpublic java.lang.String getId()
getId in interface javax.servlet.http.HttpSessionpublic long getLastAccessedTime()
getLastAccessedTime in interface javax.servlet.http.HttpSessionpublic void access()
public int getMaxInactiveInterval()
getMaxInactiveInterval in interface javax.servlet.http.HttpSessionpublic javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext in interface javax.servlet.http.HttpSessionpublic java.lang.Object getValue(java.lang.String name)
getValue in interface javax.servlet.http.HttpSessionpublic java.lang.String[] getValueNames()
getValueNames in interface javax.servlet.http.HttpSessionpublic void invalidate()
invalidate in interface javax.servlet.http.HttpSessionpublic boolean isNew()
isNew in interface javax.servlet.http.HttpSession
public void putValue(java.lang.String name,
java.lang.Object value)
putValue in interface javax.servlet.http.HttpSessionpublic void removeAttribute(java.lang.String name)
removeAttribute in interface javax.servlet.http.HttpSession
private void removeAttribute(java.lang.String name,
boolean invocation)
public void removeValue(java.lang.String name)
removeValue in interface javax.servlet.http.HttpSession
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface javax.servlet.http.HttpSessionname - The new attribute valuevalue - The new attribute valuepublic void setMaxInactiveInterval(int i)
setMaxInactiveInterval in interface javax.servlet.http.HttpSessioni - The new maxInactiveInterval valuepublic java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||