|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.wfnm.web.HttpSessionWrapper
An attribute container wrapper for http session. Implements the AttributeContainer abstraction of the http session and handles the binding/unbinding of objects to/from the original http session
Method Summary | |
Object |
getAttribute(String key)
Gets the value of an attribute. |
Enumeration |
getAttributeNames()
Returns an enumeration of attribute names. |
long |
getCreationTime()
Returns the creation time of the session. |
String |
getId()
Get the unique identifier of this attribute container. |
long |
getLastAccessedTime()
Returns the last accessed time of the session. |
int |
getMaxInactiveInterval()
Returns the max inactive interval of the session. |
javax.servlet.ServletContext |
getServletContext()
Returns the servlet context. |
javax.servlet.http.HttpSessionContext |
getSessionContext()
Returns the http session context. |
Object |
getValue(String key)
Returns the value of an object. |
String[] |
getValueNames()
Returns an array of the value names |
void |
invalidate()
Invalidate the session |
boolean |
isNew()
Returns whether the session is new. |
void |
putValue(String key,
Object value)
Set the value of an attribute AND notify the event to WFNM. |
void |
removeAttribute(String key)
Removes the attribute AND notify the event to WFNM. |
void |
removeAttributeValue(String key)
Removes an attribute. |
void |
removeValue(String key)
Removes the attribute AND notify the event to WFNM. |
void |
setAttribute(String key,
Object value)
Set the value of an attribute AND notify the event to WFNM. |
void |
setAttributeValue(String key,
Object value)
Set the value of an attribute. |
void |
setMaxInactiveInterval(int maxInactiveInterval)
Set the max inactive interval of the session. |
static javax.servlet.http.HttpSession |
wrapItIfNecessary(javax.servlet.http.HttpSession session)
Wraps the session with the HttpSessionWrapper if necessary |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static javax.servlet.http.HttpSession wrapItIfNecessary(javax.servlet.http.HttpSession session)
session
- the http session
public void setAttribute(String key, Object value)
setAttribute
in interface javax.servlet.http.HttpSession
key
- the key of the attributevalue
- the value of the attributepublic Object getAttribute(String key)
getAttribute
in interface AttributeContainer
key
- the attribute key
public Enumeration getAttributeNames()
getAttributeNames
in interface AttributeContainer
public void setAttributeValue(String key, Object value)
setAttributeValue
in interface AttributeContainer
key
- the attribute keyvalue
- the attribute valuepublic long getCreationTime()
getCreationTime
in interface javax.servlet.http.HttpSession
public String getId()
getId
in interface AttributeContainer
public long getLastAccessedTime()
getLastAccessedTime
in interface javax.servlet.http.HttpSession
public void setMaxInactiveInterval(int maxInactiveInterval)
setMaxInactiveInterval
in interface javax.servlet.http.HttpSession
maxInactiveInterval
- the max inactive interval of the sessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval
in interface javax.servlet.http.HttpSession
public boolean isNew()
isNew
in interface javax.servlet.http.HttpSession
public javax.servlet.ServletContext getServletContext()
getServletContext
in interface javax.servlet.http.HttpSession
public javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext
in interface javax.servlet.http.HttpSession
public Object getValue(String key)
getValue
in interface javax.servlet.http.HttpSession
key
- the key of the object
public String[] getValueNames()
getValueNames
in interface javax.servlet.http.HttpSession
public void invalidate()
invalidate
in interface javax.servlet.http.HttpSession
public void putValue(String key, Object value)
putValue
in interface javax.servlet.http.HttpSession
key
- the key of the attrubutevalue
- the value of the attributepublic void removeAttribute(String key)
removeAttribute
in interface javax.servlet.http.HttpSession
key
- the key of the attributepublic void removeAttributeValue(String key)
removeAttributeValue
in interface AttributeContainer
key
- the attribute keypublic void removeValue(String key)
removeValue
in interface javax.servlet.http.HttpSession
key
- the key of the attribute
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |