|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WrappedSession
A generic session, wrapping a more specific session implementation, e.g.
HttpSession
or PortletSession
.
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Gets an attribute from this session. |
java.util.Set<java.lang.String> |
getAttributeNames()
Gets the current set of attribute names stored in this session. |
long |
getCreationTime()
Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT. |
java.lang.String |
getId()
Gets a string with a unique identifier for the session. |
long |
getLastAccessedTime()
Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT, and marked by the time the container received the request. |
int |
getMaxInactiveInterval()
Returns the maximum time interval, in seconds, that this session will be kept open between client accesses. |
void |
invalidate()
Invalidates this session then unbinds any objects bound to it. |
boolean |
isNew()
Returns true if the client does not yet know about the session or if the client chooses not to join the session. |
void |
removeAttribute(java.lang.String name)
Removes the object bound with the specified name from this session. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Saves an attribute value in this session. |
void |
setMaxInactiveInterval(int interval)
Specifies the time, in seconds, between client requests before the servlet container will invalidate this session. |
Method Detail |
---|
int getMaxInactiveInterval()
HttpSession.getMaxInactiveInterval()
,
PortletSession.getMaxInactiveInterval()
java.lang.Object getAttribute(java.lang.String name)
name
- the name of the attribute
null
if the attribute is not
defined in the sessionHttpSession.getAttribute(String)
,
PortletSession.getAttribute(String)
void setAttribute(java.lang.String name, java.lang.Object value)
name
- the name of the attributevalue
- the attribute valueHttpSession.setAttribute(String, Object)
,
PortletSession.setAttribute(String, Object)
java.util.Set<java.lang.String> getAttributeNames()
HttpSession.getAttributeNames()
,
PortletSession.getAttributeNames()
void invalidate()
HttpSession.invalidate()
,
PortletSession.invalidate()
java.lang.String getId()
HttpSession.getId()
,
PortletSession.getId()
long getCreationTime()
java.lang.IllegalStateException
- if this method is called on an invalidated sessionHttpSession.getCreationTime()
,
PortletSession.getCreationTime()
long getLastAccessedTime()
Actions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.
java.lang.IllegalStateException
- if this method is called on an invalidated sessionHttpSession.getLastAccessedTime()
,
PortletSession.getLastAccessedTime()
boolean isNew()
java.lang.IllegalStateException
- if this method is called on an invalidated sessionHttpSession.isNew()
,
PortletSession.isNew()
void removeAttribute(java.lang.String name)
name
- the name of the object to remove from this session
java.lang.IllegalStateException
- if this method is called on an invalidated sessionHttpSession.removeAttribute(String)
,
PortletSession.removeAttribute(String)
void setMaxInactiveInterval(int interval)
interval
- An integer specifying the number of secondsHttpSession.setMaxInactiveInterval(int)
,
PortletSession.setMaxInactiveInterval(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |