Package org.eclipse.jetty.server.session
Class SessionData
- java.lang.Object
-
- org.eclipse.jetty.server.session.SessionData
-
- All Implemented Interfaces:
java.io.Serializable
@Deprecated(since="2021-05-27") public class SessionData extends java.lang.Object implements java.io.Serializable
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.SessionData The data associated with a session. A Session object has a 1:1 relationship with a SessionData object. The behaviour of sessions is implemented in the Session object (eg calling listeners, keeping timers etc). A Session's associated SessionData is the object which can be persisted, serialized etc.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SessionData(java.lang.String id, java.lang.String cpath, java.lang.String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs)
Deprecated.SessionData(java.lang.String id, java.lang.String cpath, java.lang.String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs, java.util.Map<java.lang.String,java.lang.Object> attributes)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
calcAndSetExpiry()
Deprecated.void
calcAndSetExpiry(long time)
Deprecated.long
calcExpiry()
Deprecated.long
calcExpiry(long time)
Deprecated.void
clean()
Deprecated.Clear all dirty flags.void
clearAllAttributes()
Deprecated.Remove all attributesvoid
copy(SessionData data)
Deprecated.Copy the info from the given sessiondatastatic void
deserializeAttributes(SessionData data, java.io.ObjectInputStream in)
Deprecated.De-serialize the attribute map of a session.long
getAccessed()
Deprecated.java.util.Map<java.lang.String,java.lang.Object>
getAllAttributes()
Deprecated.java.lang.Object
getAttribute(java.lang.String name)
Deprecated.java.lang.String
getContextPath()
Deprecated.long
getCookieSet()
Deprecated.long
getCreated()
Deprecated.long
getExpiry()
Deprecated.java.lang.String
getId()
Deprecated.java.util.Set<java.lang.String>
getKeys()
Deprecated.long
getLastAccessed()
Deprecated.java.lang.String
getLastNode()
Deprecated.long
getLastSaved()
Deprecated.long
getMaxInactiveMs()
Deprecated.java.lang.String
getVhost()
Deprecated.boolean
isDirty()
Deprecated.boolean
isExpiredAt(long time)
Deprecated.boolean
isMetaDataDirty()
Deprecated.void
putAllAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Deprecated.static void
serializeAttributes(SessionData data, java.io.ObjectOutputStream out)
Deprecated.Serialize the attribute map of the session.void
setAccessed(long accessed)
Deprecated.java.lang.Object
setAttribute(java.lang.String name, java.lang.Object value)
Deprecated.void
setContextPath(java.lang.String contextPath)
Deprecated.void
setCookieSet(long cookieSet)
Deprecated.void
setCreated(long created)
Deprecated.void
setDirty(boolean dirty)
Deprecated.void
setDirty(java.lang.String name)
Deprecated.void
setExpiry(long expiry)
Deprecated.void
setId(java.lang.String id)
Deprecated.void
setLastAccessed(long lastAccessed)
Deprecated.void
setLastNode(java.lang.String lastNode)
Deprecated.void
setLastSaved(long lastSaved)
Deprecated.void
setMaxInactiveMs(long maxInactive)
Deprecated.void
setMetaDataDirty(boolean metaDataDirty)
Deprecated.void
setVhost(java.lang.String vhost)
Deprecated.java.lang.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
SessionData
public SessionData(java.lang.String id, java.lang.String cpath, java.lang.String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs)
Deprecated.
-
SessionData
public SessionData(java.lang.String id, java.lang.String cpath, java.lang.String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs, java.util.Map<java.lang.String,java.lang.Object> attributes)
Deprecated.
-
-
Method Detail
-
serializeAttributes
public static void serializeAttributes(SessionData data, java.io.ObjectOutputStream out) throws java.io.IOException
Deprecated.Serialize the attribute map of the session. This special handling allows us to record which classloader should be used to load the value of the attribute: either the container classloader (which could be the application loader ie null, or jetty's startjar loader) or the webapp's classloader.- Parameters:
data
- the SessionData for which to serialize the attributesout
- the stream to which to serialize- Throws:
java.io.IOException
-
deserializeAttributes
public static void deserializeAttributes(SessionData data, java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
Deprecated.De-serialize the attribute map of a session. When the session was serialized, we will have recorded which classloader should be used to recover the attribute value. The classloader could be the container classloader, or the webapp classloader.- Parameters:
data
- the SessionData for which to deserialize the attribute mapin
- the serialized stream- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
copy
public void copy(SessionData data)
Deprecated.Copy the info from the given sessiondata- Parameters:
data
- the sessiondata to be copied
-
getLastSaved
public long getLastSaved()
Deprecated.- Returns:
- time at which session was last written out
-
setLastSaved
public void setLastSaved(long lastSaved)
Deprecated.
-
isDirty
public boolean isDirty()
Deprecated.- Returns:
- true if a session needs to be written out
-
setDirty
public void setDirty(boolean dirty)
Deprecated.
-
isMetaDataDirty
public boolean isMetaDataDirty()
Deprecated.- Returns:
- the metaDataDirty
-
setMetaDataDirty
public void setMetaDataDirty(boolean metaDataDirty)
Deprecated.- Parameters:
metaDataDirty
- true means non-attribute data has changed
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
Deprecated.- Parameters:
name
- the name of the attribute- Returns:
- the value of the attribute named
-
getKeys
public java.util.Set<java.lang.String> getKeys()
Deprecated.- Returns:
- a Set of attribute names
-
setAttribute
public java.lang.Object setAttribute(java.lang.String name, java.lang.Object value)
Deprecated.
-
setDirty
public void setDirty(java.lang.String name)
Deprecated.
-
clean
public void clean()
Deprecated.Clear all dirty flags.
-
putAllAttributes
public void putAllAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Deprecated.
-
clearAllAttributes
public void clearAllAttributes()
Deprecated.Remove all attributes
-
getAllAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAllAttributes()
Deprecated.- Returns:
- an unmodifiable map of the attributes
-
getId
public java.lang.String getId()
Deprecated.- Returns:
- the id of the session
-
setId
public void setId(java.lang.String id)
Deprecated.
-
getContextPath
public java.lang.String getContextPath()
Deprecated.- Returns:
- the context path associated with this session
-
setContextPath
public void setContextPath(java.lang.String contextPath)
Deprecated.
-
getVhost
public java.lang.String getVhost()
Deprecated.- Returns:
- virtual host of context associated with session
-
setVhost
public void setVhost(java.lang.String vhost)
Deprecated.
-
getLastNode
public java.lang.String getLastNode()
Deprecated.- Returns:
- last node to manage the session
-
setLastNode
public void setLastNode(java.lang.String lastNode)
Deprecated.
-
getExpiry
public long getExpiry()
Deprecated.- Returns:
- time at which session expires
-
setExpiry
public void setExpiry(long expiry)
Deprecated.
-
calcExpiry
public long calcExpiry()
Deprecated.
-
calcExpiry
public long calcExpiry(long time)
Deprecated.
-
calcAndSetExpiry
public void calcAndSetExpiry(long time)
Deprecated.
-
calcAndSetExpiry
public void calcAndSetExpiry()
Deprecated.
-
getCreated
public long getCreated()
Deprecated.
-
setCreated
public void setCreated(long created)
Deprecated.
-
getCookieSet
public long getCookieSet()
Deprecated.- Returns:
- time cookie was set
-
setCookieSet
public void setCookieSet(long cookieSet)
Deprecated.
-
getAccessed
public long getAccessed()
Deprecated.- Returns:
- time session was accessed
-
setAccessed
public void setAccessed(long accessed)
Deprecated.
-
getLastAccessed
public long getLastAccessed()
Deprecated.- Returns:
- previous time session was accessed
-
setLastAccessed
public void setLastAccessed(long lastAccessed)
Deprecated.
-
getMaxInactiveMs
public long getMaxInactiveMs()
Deprecated.
-
setMaxInactiveMs
public void setMaxInactiveMs(long maxInactive)
Deprecated.
-
isExpiredAt
public boolean isExpiredAt(long time)
Deprecated.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-