public abstract class SimpAttributesContextHolder
extends java.lang.Object
SimpAttributes
object.Constructor and Description |
---|
SimpAttributesContextHolder() |
Modifier and Type | Method and Description |
---|---|
static SimpAttributes |
currentAttributes()
Return the SimpAttributes currently bound to the thread or raise an
IllegalStateException if none are bound.. |
static SimpAttributes |
getAttributes()
Return the SimpAttributes currently bound to the thread.
|
static void |
resetAttributes()
Reset the SimpAttributes for the current thread.
|
static void |
setAttributes(SimpAttributes attributes)
Bind the given SimpAttributes to the current thread,
|
static void |
setAttributesFromMessage(Message<?> message)
Extract the SiMP session attributes from the given message, wrap them in
a
SimpAttributes instance and bind it to the current thread, |
public static void resetAttributes()
public static void setAttributes(@Nullable SimpAttributes attributes)
attributes
- the RequestAttributes to exposepublic static void setAttributesFromMessage(Message<?> message)
SimpAttributes
instance and bind it to the current thread,message
- the message to extract session attributes from@Nullable public static SimpAttributes getAttributes()
null
if not boundpublic static SimpAttributes currentAttributes() throws java.lang.IllegalStateException
IllegalStateException
if none are bound..null
java.lang.IllegalStateException
- if attributes are not bound