| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| public static final String | DESTRUCTION_CALLBACK_NAME_PREFIX
Prefix for the name of session attributes used to store destruction callbacks. |
| private static final Log | |
| public static final String | SESSION_COMPLETED_NAME
Key set after the session is completed. |
| public static final String | SESSION_MUTEX_NAME
Key for the mutex session attribute. |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | SimpAttributes(String
the id of the associated session sessionId, Map<String, Object> the attributes attributes)Constructor wrapping the given session attributes map. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public static SimpAttributes | fromMessage(Message<?>
the message to extract session attributes from message)Extract the SiMP session attributes from the given message and
wrap them in a |
| public Object | Returns: the current attribute value, ornull if not foundthe name of the attribute name)Return the value for the attribute of the given name, if any. |
| public String[] | Returns: the attribute names as String array, nevernullRetrieve the names of all attributes. |
| public String | Returns: the session id as String (nevernull)Return an id for the associated session. |
| public Object | Returns: the session mutex to use (nevernull)Expose the object to synchronize on for the underlying session. |
| public boolean | |
| public void | registerDestructionCallback(String
the name of the attribute to register the callback for name, Runnable the destruction callback to be executed callback)Register a callback to execute on destruction of the specified attribute. |
| public void | removeAttribute(String
the name of the attribute name)Remove the attribute of the given name, if it exists. |
| private void | |
| public void | |
| public void | setAttribute(String
the name of the attribute name, Object the value for the attribute value)Set the value with the given name replacing an existing value (if any). |
| attributes | back to summary |
|---|---|
| private final Map<String, Object> attributes | |
| DESTRUCTION_CALLBACK_NAME_PREFIX | back to summary |
|---|---|
| public static final String DESTRUCTION_CALLBACK_NAME_PREFIX Prefix for the name of session attributes used to store destruction callbacks. | |
| logger | back to summary |
|---|---|
| private static final Log logger | |
| SESSION_COMPLETED_NAME | back to summary |
|---|---|
| public static final String SESSION_COMPLETED_NAME Key set after the session is completed. | |
| SESSION_MUTEX_NAME | back to summary |
|---|---|
| public static final String SESSION_MUTEX_NAME Key for the mutex session attribute. | |
| sessionId | back to summary |
|---|---|
| private final String sessionId | |
| SimpAttributes | back to summary |
|---|---|
| public SimpAttributes(String sessionId, Map<String, Object> attributes) Constructor wrapping the given session attributes map. | |
| executeDestructionCallbacks | back to summary |
|---|---|
| private void executeDestructionCallbacks() | |
| fromMessage | back to summary |
|---|---|
| public static SimpAttributes fromMessage(Message<?> message) Extract the SiMP session attributes from the given message and
wrap them in a
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(String name) Return the value for the attribute of the given name, if any. | |
| getAttributeNames | back to summary |
|---|---|
| public String[] getAttributeNames() Retrieve the names of all attributes.
| |
| getSessionId | back to summary |
|---|---|
| public String getSessionId() Return an id for the associated session.
| |
| getSessionMutex | back to summary |
|---|---|
| public Object getSessionMutex() Expose the object to synchronize on for the underlying session.
| |
| isSessionCompleted | back to summary |
|---|---|
| public boolean isSessionCompleted() Whether the | |
| registerDestructionCallback | back to summary |
|---|---|
| public void registerDestructionCallback(String name, Runnable callback) Register a callback to execute on destruction of the specified attribute. The callback is executed when the session is closed. | |
| removeAttribute | back to summary |
|---|---|
| public void removeAttribute(String name) Remove the attribute of the given name, if it exists. Also removes the registered destruction callback for the specified attribute, if any. However it does not execute the callback. It is assumed the removed object will continue to be used and destroyed independently at the appropriate time.
| |
| removeDestructionCallback | back to summary |
|---|---|
| private void removeDestructionCallback(String name) | |
| sessionCompleted | back to summary |
|---|---|
| public void sessionCompleted() Invoked when the session is completed. Executed completion callbacks. | |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(String name, Object value) Set the value with the given name replacing an existing value (if any). | |