public class StandardSession extends Object implements WxSession, InternalSession
| 限定符和类型 | 字段和说明 |
|---|---|
protected AtomicInteger |
accessCount
The access count for this session.
|
protected Map<String,Object> |
attributes |
protected long |
creationTime
The time this session was created, in milliseconds since midnight,
January 1, 1970 GMT.
|
protected boolean |
expiring
We are currently processing a session expiration, so bypass
certain IllegalStateException tests.
|
protected StandardSessionFacade |
facade
The facade associated with this session.
|
protected String |
id
The session identifier of this Session.
|
protected boolean |
isValid
Flag indicating whether this session is valid or not.
|
protected InternalSessionManager |
manager
The Manager with which this Session is associated.
|
protected int |
maxInactiveInterval
The default maximum inactive interval for Sessions created by
this Manager.
|
protected static StringManager |
SM
The string manager for this package.
|
protected long |
thisAccessedTime
The current accessed time for this session.
|
| 构造器和说明 |
|---|
StandardSession(InternalSessionManager manager) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
access()
Update the accessed time information for this session.
|
void |
endAccess()
End the access.
|
boolean |
equals(Object o) |
void |
expire()
Perform the internal processing required to invalidate this session,
without triggering an exception if the session has already expired.
|
Object |
getAttribute(String name) |
Enumeration<String> |
getAttributeNames() |
String |
getIdInternal()
Return the session identifier for this session.
|
WxSession |
getSession()
Return the
HttpSession for which this object
is the facade. |
int |
hashCode() |
void |
invalidate() |
boolean |
isValid()
Return the
isValid flag for this session. |
protected boolean |
isValidInternal()
Return the
isValid flag for this session without any expiration
check. |
protected String[] |
keys()
Return the names of all currently defined session attributes
as an array of Strings.
|
void |
removeAttribute(String name) |
protected void |
removeAttributeInternal(String name) |
void |
setAttribute(String name,
Object value) |
void |
setCreationTime(long time)
Set the creation time for this session.
|
void |
setId(String id)
Set the session identifier for this session.
|
void |
setMaxInactiveInterval(int interval)
Set the default maximum inactive interval (in seconds)
for Sessions created by this Manager.
|
void |
setValid(boolean isValid)
Set the
isValid flag for this session. |
protected static final StringManager SM
protected String id
protected volatile boolean isValid
protected transient volatile boolean expiring
protected transient InternalSessionManager manager
protected long creationTime
protected volatile long thisAccessedTime
protected int maxInactiveInterval
protected transient StandardSessionFacade facade
protected transient AtomicInteger accessCount
public StandardSession(InternalSessionManager manager)
public Object getAttribute(String name)
getAttribute 在接口中 WxSessionpublic Enumeration<String> getAttributeNames()
getAttributeNames 在接口中 WxSessionpublic void setAttribute(String name, Object value)
setAttribute 在接口中 WxSessionpublic void removeAttribute(String name)
removeAttribute 在接口中 WxSessionpublic void invalidate()
invalidate 在接口中 WxSessionpublic WxSession getSession()
InternalSessionHttpSession for which this object
is the facade.getSession 在接口中 InternalSessionprotected boolean isValidInternal()
isValid flag for this session without any expiration
check.public boolean isValid()
InternalSessionisValid flag for this session.isValid 在接口中 InternalSessionpublic void setValid(boolean isValid)
isValid flag for this session.setValid 在接口中 InternalSessionisValid - The new value for the isValid flagpublic String getIdInternal()
InternalSessiongetIdInternal 在接口中 InternalSessionprotected void removeAttributeInternal(String name)
public void expire()
InternalSessionexpire 在接口中 InternalSessionpublic void access()
InternalSessionaccess 在接口中 InternalSessionpublic void endAccess()
InternalSessionendAccess 在接口中 InternalSessionpublic void setCreationTime(long time)
InternalSessionsetCreationTime 在接口中 InternalSessiontime - The new creation timepublic void setMaxInactiveInterval(int interval)
InternalSessionsetMaxInactiveInterval 在接口中 InternalSessioninterval - The new default valuepublic void setId(String id)
InternalSessionsetId 在接口中 InternalSessionid - The new session identifierprotected String[] keys()
Copyright © 2024. All rights reserved.