Class InfinispanSessionData
- java.lang.Object
-
- org.eclipse.jetty.server.session.SessionData
-
- org.eclipse.jetty.session.infinispan.InfinispanSessionData
-
- All Implemented Interfaces:
java.io.Serializable
public class InfinispanSessionData extends SessionData
InfinispanSessionData Specialization of SessionData to hold the attributes as a serialized byte array. This is necessary because to deserialize the attributes correctly, we need to know which classloader to use, which is normally provided as the thread context classloader. However, infinispan marshalling uses a thread pool and thus these threads have no knowledge of the correct classloader to use.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
_serializedAttributes
-
Fields inherited from class org.eclipse.jetty.server.session.SessionData
_accessed, _attributes, _contextPath, _cookieSet, _created, _dirty, _expiry, _id, _lastAccessed, _lastNode, _lastSaved, _maxInactiveMs, _metaDataDirty, _vhost
-
-
Constructor Summary
Constructors Constructor Description InfinispanSessionData(java.lang.String id, java.lang.String cpath, java.lang.String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs)
InfinispanSessionData(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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deserializeAttributes()
byte[]
getSerializedAttributes()
void
serializeAttributes()
void
setSerializedAttributes(byte[] serializedAttributes)
-
Methods inherited from class org.eclipse.jetty.server.session.SessionData
calcAndSetExpiry, calcAndSetExpiry, calcExpiry, calcExpiry, clean, clearAllAttributes, copy, deserializeAttributes, getAccessed, getAllAttributes, getAttribute, getContextPath, getCookieSet, getCreated, getExpiry, getId, getKeys, getLastAccessed, getLastNode, getLastSaved, getMaxInactiveMs, getVhost, isDirty, isExpiredAt, isMetaDataDirty, putAllAttributes, serializeAttributes, setAccessed, setAttribute, setContextPath, setCookieSet, setCreated, setDirty, setDirty, setExpiry, setId, setLastAccessed, setLastNode, setLastSaved, setMaxInactiveMs, setMetaDataDirty, setVhost, toString
-
-
-
-
Constructor Detail
-
InfinispanSessionData
public InfinispanSessionData(java.lang.String id, java.lang.String cpath, java.lang.String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs)
-
InfinispanSessionData
public InfinispanSessionData(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)
-
-
Method Detail
-
getSerializedAttributes
public byte[] getSerializedAttributes()
-
setSerializedAttributes
public void setSerializedAttributes(byte[] serializedAttributes)
-
deserializeAttributes
public void deserializeAttributes() throws java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.lang.ClassNotFoundException
java.io.IOException
-
serializeAttributes
public void serializeAttributes() throws java.io.IOException
- Throws:
java.io.IOException
-
-