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