@Beta public final class SimpleSession extends java.lang.Object implements Session
Constructor and Description |
---|
SimpleSession(SessionKey key) |
Modifier and Type | Method and 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) |
public SimpleSession(SessionKey key)
public SessionKey getKey()
public java.lang.Object getAttribute(java.lang.String key)
getAttribute
in interface ScopeAttributes
public <T> T getAttribute(java.lang.Class<T> type)
getAttribute
in interface ScopeAttributes
public void setAttribute(java.lang.String key, java.lang.Object value)
setAttribute
in interface MutableAttributes
public <T> void setAttribute(T value)
setAttribute
in interface MutableAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
getAttributes
in interface ScopeAttributes
public void removeAttribute(java.lang.String key)
removeAttribute
in interface MutableAttributes
public <T> void removeAttribute(java.lang.Class<T> type)
removeAttribute
in interface MutableAttributes
public void invalidate()
invalidate
in interface Session