public abstract class ESessionBase extends Object implements javax.servlet.http.HttpSession
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ESessionBase.ClientType |
| 限定符和类型 | 字段和说明 |
|---|---|
protected static String |
ATTR_LOGINED |
protected static String |
ATTR_UID |
protected ESessionBase.ClientType |
clientType |
protected long |
creationTime |
protected String |
id |
protected boolean |
invalid |
protected long |
lastAccessedTime |
protected int |
maxInactiveInterval |
protected javax.servlet.ServletContext |
servletContext |
protected String |
SessionAttrName |
protected String |
SessionCacheName |
protected Integer |
SessionTimeOutMinutes |
protected String |
token |
| 构造器和说明 |
|---|
ESessionBase() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
generateSessionId()
生成或者获取SessionId
|
<T> T |
getAttr(String name)
getAttribute泛型
|
protected String |
getCookieKey()
获取cookie的存储key
|
protected String |
getCookieKey(String name)
获取cookie的存储key
|
long |
getCreationTime() |
String |
getId() |
long |
getLastAccessedTime() |
Boolean |
getLogined()
返回登录状态
|
int |
getMaxInactiveInterval() |
javax.servlet.ServletContext |
getServletContext() |
javax.servlet.http.HttpSessionContext |
getSessionContext() |
String |
getToken() |
ESessionBase.ClientType |
getType()
获取客户端类型
|
String |
getUid()
返回用户ID
|
IUser |
getUser()
返回用户对象实例
|
Object |
getValue(String name) |
String[] |
getValueNames() |
boolean |
isNew() |
void |
putValue(String name,
Object value) |
void |
refresh()
更新Session
|
void |
removeValue(String name) |
void |
setLogined(Boolean logined)
设置登录状态
|
void |
setMaxInactiveInterval(int interval) |
void |
setType(ESessionBase.ClientType type)
设置客户端类型
|
void |
setUid(String uid)
设置用户ID
|
protected String token
protected String id
protected long creationTime
protected volatile long lastAccessedTime
protected int maxInactiveInterval
protected javax.servlet.ServletContext servletContext
protected volatile boolean invalid
protected Integer SessionTimeOutMinutes
protected String SessionAttrName
protected String SessionCacheName
protected ESessionBase.ClientType clientType
protected String getCookieKey()
protected String generateSessionId()
public String getToken()
public ESessionBase.ClientType getType()
public void setType(ESessionBase.ClientType type)
type - public <T> T getAttr(String name)
name - public void setLogined(Boolean logined)
logined - public Boolean getLogined()
public void setUid(String uid)
uid - public String getUid()
uid - public IUser getUser()
public void refresh()
public javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext 在接口中 javax.servlet.http.HttpSessionpublic String[] getValueNames()
getValueNames 在接口中 javax.servlet.http.HttpSessionpublic void putValue(String name, Object value)
putValue 在接口中 javax.servlet.http.HttpSessionpublic void removeValue(String name)
removeValue 在接口中 javax.servlet.http.HttpSessionpublic boolean isNew()
isNew 在接口中 javax.servlet.http.HttpSessionpublic String getId()
getId 在接口中 javax.servlet.http.HttpSessionpublic long getCreationTime()
getCreationTime 在接口中 javax.servlet.http.HttpSessionpublic long getLastAccessedTime()
getLastAccessedTime 在接口中 javax.servlet.http.HttpSessionpublic javax.servlet.ServletContext getServletContext()
getServletContext 在接口中 javax.servlet.http.HttpSessionpublic void setMaxInactiveInterval(int interval)
setMaxInactiveInterval 在接口中 javax.servlet.http.HttpSessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval 在接口中 javax.servlet.http.HttpSessionCopyright © 2020. All rights reserved.