Package com.enonic.xp.session
Class SimpleSession
- java.lang.Object
-
- com.enonic.xp.session.SimpleSession
-
- All Implemented Interfaces:
MutableAttributes
,ScopeAttributes
,Session
@Beta public final class SimpleSession extends java.lang.Object implements Session
-
-
Constructor Summary
Constructors Constructor Description SimpleSession(SessionKey key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
getAttribute(java.lang.Class<T> type)
java.lang.Object
getAttribute(java.lang.String key)
java.util.Map<java.lang.String,java.lang.Object>
getAttributes()
SessionKey
getKey()
void
invalidate()
<T> void
removeAttribute(java.lang.Class<T> type)
void
removeAttribute(java.lang.String key)
void
setAttribute(java.lang.String key, java.lang.Object value)
<T> void
setAttribute(T value)
-
-
-
Constructor Detail
-
SimpleSession
public SimpleSession(SessionKey key)
-
-
Method Detail
-
getKey
public SessionKey getKey()
-
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
- Specified by:
getAttribute
in interfaceScopeAttributes
-
getAttribute
public <T> T getAttribute(java.lang.Class<T> type)
- Specified by:
getAttribute
in interfaceScopeAttributes
-
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
- Specified by:
setAttribute
in interfaceMutableAttributes
-
setAttribute
public <T> void setAttribute(T value)
- Specified by:
setAttribute
in interfaceMutableAttributes
-
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
- Specified by:
getAttributes
in interfaceScopeAttributes
-
removeAttribute
public void removeAttribute(java.lang.String key)
- Specified by:
removeAttribute
in interfaceMutableAttributes
-
removeAttribute
public <T> void removeAttribute(java.lang.Class<T> type)
- Specified by:
removeAttribute
in interfaceMutableAttributes
-
invalidate
public void invalidate()
- Specified by:
invalidate
in interfaceSession
-
-