public class Session extends Object
| Constructor and Description |
|---|
Session() |
Session(String requestedSessionId)
Create a new session using a session identifier
|
| Modifier and Type | Method and Description |
|---|---|
ConcurrentHashMap<String,Object> |
attributes()
Return a
ConcurrentHashMap of attributes. |
Object |
getAttribute(String key)
Return an attribute.
|
String |
getIdInternal()
Return the session identifier for this session.
|
long |
getSessionTimeout()
Return a long representing the maximum idle time (in milliseconds) a session can be.
|
long |
getTimestamp() |
boolean |
isValid()
Is the current Session valid?
|
Object |
removeAttribute(String key)
Remove an attribute.
|
void |
setAttribute(String key,
Object value)
Add an attribute to this session.
|
void |
setIdInternal(String requestedSessionId)
Return the session identifier for this session.
|
void |
setSessionTimeout(long sessionTimeout)
Set a long representing the maximum idle time (in milliseconds) a session can be.
|
void |
setTimestamp(long timestamp)
Set the timestamp when this session has been created.
|
void |
setValid(boolean isValid)
Set this object as validated.
|
public Session()
public Session(String requestedSessionId)
requestedSessionId - session identifierpublic boolean isValid()
public void setValid(boolean isValid)
isValid - public String getIdInternal()
public void setIdInternal(String requestedSessionId)
public void setAttribute(String key, Object value)
key - value - public Object getAttribute(String key)
key - public Object removeAttribute(String key)
key - public ConcurrentHashMap<String,Object> attributes()
ConcurrentHashMap of attributes.public long getSessionTimeout()
public void setSessionTimeout(long sessionTimeout)
sessionTimeout - a long representing the maximum idle time (in milliseconds) a session can be.public long getTimestamp()
public void setTimestamp(long timestamp)
timestamp - a long representing when the session has been created.Copyright © 2013 Oracle Corporation. All Rights Reserved.