AbstractSessionAdapter, BasicSessionAdapterpublic interface SessionAdapter
| Modifier and Type | Method | Description |
|---|---|---|
<T> T |
getAdaptee() |
Returns the adaptee object to provide session information.
|
<T> T |
getAttribute(java.lang.String name) |
Returns the value of the named attribute as a given type,
or
null if no attribute of the given name exists. |
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
Returns an Enumeration of String objects containing the names
of all the objects bound to 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() |
Returns a string containing the unique identifier assigned to this 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 the servlet container will keep
this session open between client accesses.
|
SessionScope |
getSessionScope() |
Gets the session scope.
|
void |
invalidate() |
Invalidates this session then unbinds any objects bound to it.
|
boolean |
isNew() |
|
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) |
Stores an attribute in this session.
|
void |
setMaxInactiveInterval(int interval) |
<T> T getAdaptee()
T - the type of the adaptee objectSessionScope getSessionScope()
java.lang.String getId()
boolean isNew()
long getCreationTime()
long getLastAccessedTime()
void setMaxInactiveInterval(int interval)
int getMaxInactiveInterval()
setMaxInactiveInterval method.
A negative time indicates the session should never timeout.java.util.Enumeration<java.lang.String> getAttributeNames()
<T> T getAttribute(java.lang.String name)
null if no attribute of the given name exists.T - the generic typename - a String specifying the name of the attributeObject containing the value of the attribute,
or null if the attribute does not existvoid setAttribute(java.lang.String name,
java.lang.Object value)
name - specifying the name of the attributevalue - the Object to be storedvoid removeAttribute(java.lang.String name)
name - the name of the object to remove from this sessionvoid invalidate()
Copyright © 2008–2018 The Aspectran Project. All rights reserved.