public class StandardSession extends Object implements WxSession, InternalSession
| 限定符和类型 | 字段和说明 | 
|---|---|
| protected AtomicInteger | accessCountThe access count for this session. | 
| protected Map<String,Object> | attributes | 
| protected long | creationTimeThe time this session was created, in milliseconds since midnight,
 January 1, 1970 GMT. | 
| protected boolean | expiringWe are currently processing a session expiration, so bypass
 certain IllegalStateException tests. | 
| protected StandardSessionFacade | facadeThe facade associated with this session. | 
| protected String | idThe session identifier of this Session. | 
| protected boolean | isValidFlag indicating whether this session is valid or not. | 
| protected InternalSessionManager | managerThe Manager with which this Session is associated. | 
| protected int | maxInactiveIntervalThe default maximum inactive interval for Sessions created by
 this Manager. | 
| protected static StringManager | SMThe string manager for this package. | 
| protected long | thisAccessedTimeThe 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  HttpSessionfor which this object
 is the facade. | 
| int | hashCode() | 
| void | invalidate() | 
| boolean | isValid()Return the  isValidflag for this session. | 
| protected boolean | isValidInternal()Return the  isValidflag 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  isValidflag 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.