Interface ConversationStorageService
- All Known Implementing Classes:
ConversationStorageServiceImpl
Deprecated.
since 9.5, the functionality is no longer supported and may be removed in the future.
A service for storing temporary data for conversation scope - e.g. data shared by each step of a wizard.
Stored data automatically expires after certain time of inactivity.
-
Method Summary
Modifier and TypeMethodDescription<T> @NotNull Conversation<T>
createConversation
(T initialValue) Deprecated.Creates a new conversation object for storing temporary data, initialized with the given value.void
deleteConversation
(int conversationId) Deprecated.Delete a conversation.<T> @NotNull Optional<Conversation<T>>
getConversation
(int conversationId, @NotNull Class<T> valueClass) Deprecated.Returns an existing conversation object orOptional.empty()
if a conversation does not exist with the provided id (e.g.
-
Method Details
-
createConversation
Deprecated.Creates a new conversation object for storing temporary data, initialized with the given value. -
getConversation
@NotNull <T> @NotNull Optional<Conversation<T>> getConversation(int conversationId, @NotNull @NotNull Class<T> valueClass) Deprecated.Returns an existing conversation object orOptional.empty()
if a conversation does not exist with the provided id (e.g. it has already expired).- Parameters:
valueClass
- class of the value stored in the conversation- Throws:
IllegalStateException
- if the conversation exists but the type of the stored object is not exactly the same as the given class
-
deleteConversation
void deleteConversation(int conversationId) Deprecated.Delete a conversation. Will do nothing if a conversation with given id does not exist.
-