public interface Session extends Attributable
Session is a stateful data context associated with a single Subject (user, daemon process,
etc) who interacts with a software system over a period of time.
A Session is intended to be managed by the business tier and accessible via other
tiers without being tied to any given client technology. This is a great benefit to Java
systems, since until now, the only viable session mechanisms were the
javax.servlet.http.HttpSession or Stateful Session EJB's, which many times
unnecessarily coupled applications to web or ejb technologies.| 限定符和类型 | 方法和说明 |
|---|---|
Object |
getAttribute(String name) |
Iterable<String> |
getAttributeNames() |
Date |
getExpireTime() |
String |
getId() |
Date |
getLastAccessTime() |
long |
getMaxInactiveInterval() |
Date |
getStartTime() |
boolean |
hasAttribute(String name) |
void |
invalidate() |
boolean |
isExpired() |
boolean |
isInvalid() |
void |
removeAttribute(String name) |
void |
setAttribute(String name,
Object value) |
void |
setLastAccessTime(Date date) |
void |
setMaxInactiveInterval(long maxIdleTimeInMillis) |
String getId()
Date getStartTime()
Date getLastAccessTime()
void setLastAccessTime(Date date)
long getMaxInactiveInterval()
void setMaxInactiveInterval(long maxIdleTimeInMillis)
boolean isExpired()
Date getExpireTime()
boolean isInvalid()
void invalidate()
void setAttribute(String name, Object value)
setAttribute 在接口中 AttributableObject getAttribute(String name)
getAttribute 在接口中 Attributableboolean hasAttribute(String name)
hasAttribute 在接口中 Attributablevoid removeAttribute(String name)
removeAttribute 在接口中 AttributableIterable<String> getAttributeNames()
getAttributeNames 在接口中 AttributableCopyright © 2022. All rights reserved.