Class SessionData
- java.lang.Object
-
- com.aspectran.core.component.session.SessionData
-
- All Implemented Interfaces:
java.io.Serializable
public class SessionData extends java.lang.Object implements java.io.SerializableThe data associated with a session.Created: 2017. 6. 6.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SessionData(java.lang.String id, long creationTime, long accessedTime, long lastAccessedTime, long maxInactiveIntervalMS)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalcAndSetExpiryTime()voidcalcAndSetExpiryTime(long time)longcalcExpiryTime()longcalcExpiryTime(long time)voidclearAllAttributes()Removes all attributes.longgetAccessedTime()java.util.Map<java.lang.String,java.lang.Object>getAllAttributes()Returns an unmodifiable map of the attributes.<T> TgetAttribute(java.lang.String name)java.util.Collection<java.lang.String>getAttributeNames()longgetCreationTime()longgetExpiryTime()java.lang.StringgetId()java.util.Set<java.lang.String>getKeys()longgetLastAccessedTime()longgetLastSaved()longgetMaxInactiveInterval()SessionScopegetSessionScope()booleanisDirty()booleanisExpiredAt(long time)voidputAllAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)Copies all of the mappings from the specified attributes.voidremoveAttribute(java.lang.String name)voidsetAccessedTime(long accessedTime)<T> TsetAttribute(java.lang.String name, java.lang.Object value)voidsetDirty(boolean dirty)voidsetExpiryTime(long expiryTime)voidsetLastAccessedTime(long lastAccessedTime)voidsetLastSaved(long lastSaved)voidsetMaxInactiveInterval(long maxInactiveInterval)java.lang.StringtoString()
-
-
-
Method Detail
-
getId
public java.lang.String getId()
-
getSessionScope
public SessionScope getSessionScope()
-
getAttribute
public <T> T getAttribute(java.lang.String name)
-
setAttribute
public <T> T setAttribute(java.lang.String name, java.lang.Object value)
-
getAttributeNames
public java.util.Collection<java.lang.String> getAttributeNames()
-
getKeys
public java.util.Set<java.lang.String> getKeys()
-
removeAttribute
public void removeAttribute(java.lang.String name)
-
getAllAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAllAttributes()
Returns an unmodifiable map of the attributes.- Returns:
- an unmodifiable map of the attributes
-
putAllAttributes
public void putAllAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Copies all of the mappings from the specified attributes.- Parameters:
attributes- the specified attributes
-
clearAllAttributes
public void clearAllAttributes()
Removes all attributes.
-
getCreationTime
public long getCreationTime()
-
getAccessedTime
public long getAccessedTime()
-
setAccessedTime
public void setAccessedTime(long accessedTime)
-
getLastAccessedTime
public long getLastAccessedTime()
-
setLastAccessedTime
public void setLastAccessedTime(long lastAccessedTime)
-
getMaxInactiveInterval
public long getMaxInactiveInterval()
-
setMaxInactiveInterval
public void setMaxInactiveInterval(long maxInactiveInterval)
-
getExpiryTime
public long getExpiryTime()
-
setExpiryTime
public void setExpiryTime(long expiryTime)
-
calcExpiryTime
public long calcExpiryTime()
-
calcExpiryTime
public long calcExpiryTime(long time)
-
calcAndSetExpiryTime
public void calcAndSetExpiryTime()
-
calcAndSetExpiryTime
public void calcAndSetExpiryTime(long time)
-
isExpiredAt
public boolean isExpiredAt(long time)
-
isDirty
public boolean isDirty()
-
setDirty
public void setDirty(boolean dirty)
-
getLastSaved
public long getLastSaved()
-
setLastSaved
public void setLastSaved(long lastSaved)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-