public class BTGStandardSession extends Object implements BTGSession, Serializable
| 构造器和说明 |
|---|
BTGStandardSession(String sessionId,
int maxInactiveInterval)
构造方法,初始化session并设置默认值
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
active()
使session处于活跃状态
|
void |
addAttributeNotRefresh(String key,
Object obj)
添加属性不进行session同步更新
|
BTGStandardSession |
cloneMe()
克隆
|
Object |
getAttribute(String key) |
Enumeration<String> |
getAttributeNames() |
long |
getCreationTime() |
String |
getId() |
long |
getLastAccessedTime() |
long |
getLastUpdateMillis()
获取session最后访问时间最后同步更新时间
|
int |
getMaxInactiveInterval() |
javax.servlet.ServletContext |
getServletContext() |
BTGSessionContext |
getSessionContext()
获取session上下文
|
Object |
getValue(String s)
已过时。
|
String[] |
getValueNames()
已过时。
|
void |
invalidate() |
boolean |
isInvalidate()
是否失效
|
boolean |
isNew() |
void |
putValue(String s,
Object o)
已过时。
|
void |
removeAttribute(String key) |
void |
removeValue(String s)
已过时。
|
void |
setAttribute(String key,
Object obj) |
void |
setLastAccessedTime(long lastAccessedTime)
设置最后激活时间
|
void |
setLastUpdateMillis(long lastUpdateMillis)
设置session最后访问时间最后同步更新时间
|
void |
setMaxInactiveInterval(int maxInactiveInterval) |
public BTGStandardSession(String sessionId, int maxInactiveInterval)
sessionId - StringmaxInactiveInterval - longpublic String getId()
getId 在接口中 javax.servlet.http.HttpSessionpublic long getCreationTime()
getCreationTime 在接口中 javax.servlet.http.HttpSessionpublic long getLastAccessedTime()
getLastAccessedTime 在接口中 javax.servlet.http.HttpSessionpublic void setLastAccessedTime(long lastAccessedTime)
BTGSessionsetLastAccessedTime 在接口中 BTGSessionlastAccessedTime - longpublic int getMaxInactiveInterval()
getMaxInactiveInterval 在接口中 javax.servlet.http.HttpSessionpublic void setMaxInactiveInterval(int maxInactiveInterval)
setMaxInactiveInterval 在接口中 javax.servlet.http.HttpSessionpublic boolean isNew()
isNew 在接口中 javax.servlet.http.HttpSessionpublic void invalidate()
invalidate 在接口中 javax.servlet.http.HttpSessionpublic boolean isInvalidate()
BTGSessionisInvalidate 在接口中 BTGSessionpublic void active()
BTGSessionactive 在接口中 BTGSessionpublic Enumeration<String> getAttributeNames()
getAttributeNames 在接口中 javax.servlet.http.HttpSessionpublic Object getAttribute(String key)
getAttribute 在接口中 javax.servlet.http.HttpSessionpublic void setAttribute(String key, Object obj)
setAttribute 在接口中 javax.servlet.http.HttpSessionpublic void removeAttribute(String key)
removeAttribute 在接口中 javax.servlet.http.HttpSession@Deprecated public String[] getValueNames()
getValueNames 在接口中 javax.servlet.http.HttpSession@Deprecated public Object getValue(String s)
getValue 在接口中 javax.servlet.http.HttpSession@Deprecated public void putValue(String s, Object o)
putValue 在接口中 javax.servlet.http.HttpSession@Deprecated public void removeValue(String s)
removeValue 在接口中 javax.servlet.http.HttpSessionpublic javax.servlet.ServletContext getServletContext()
getServletContext 在接口中 javax.servlet.http.HttpSessionpublic BTGSessionContext getSessionContext()
BTGSessiongetSessionContext 在接口中 BTGSessiongetSessionContext 在接口中 javax.servlet.http.HttpSessionpublic BTGStandardSession cloneMe()
BTGSessioncloneMe 在接口中 BTGSessionpublic void addAttributeNotRefresh(String key, Object obj)
BTGSessionaddAttributeNotRefresh 在接口中 BTGSessionkey - 参数名obj - 参数值public long getLastUpdateMillis()
BTGSessiongetLastUpdateMillis 在接口中 BTGSessionpublic void setLastUpdateMillis(long lastUpdateMillis)
BTGSessionsetLastUpdateMillis 在接口中 BTGSessionlastUpdateMillis - session最后访问时间最后同步更新时间Copyright © 2020. All rights reserved.