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
在接口中 WxSession
public Enumeration<String> getAttributeNames()
getAttributeNames
在接口中 WxSession
public void setAttribute(String name, Object value)
setAttribute
在接口中 WxSession
public void removeAttribute(String name)
removeAttribute
在接口中 WxSession
public void invalidate()
invalidate
在接口中 WxSession
public WxSession getSession()
InternalSession
HttpSession
for which this object
is the facade.getSession
在接口中 InternalSession
protected boolean isValidInternal()
isValid
flag for this session without any expiration
check.public boolean isValid()
InternalSession
isValid
flag for this session.isValid
在接口中 InternalSession
public void setValid(boolean isValid)
isValid
flag for this session.setValid
在接口中 InternalSession
isValid
- The new value for the isValid
flagpublic String getIdInternal()
InternalSession
getIdInternal
在接口中 InternalSession
protected void removeAttributeInternal(String name)
public void expire()
InternalSession
expire
在接口中 InternalSession
public void access()
InternalSession
access
在接口中 InternalSession
public void endAccess()
InternalSession
endAccess
在接口中 InternalSession
public void setCreationTime(long time)
InternalSession
setCreationTime
在接口中 InternalSession
time
- The new creation timepublic void setMaxInactiveInterval(int interval)
InternalSession
setMaxInactiveInterval
在接口中 InternalSession
interval
- The new default valuepublic void setId(String id)
InternalSession
setId
在接口中 InternalSession
id
- The new session identifierprotected String[] keys()
Copyright © 2019. All rights reserved.