Package com.embabel.chat.support
Class InMemoryConversationFactory
-
- All Implemented Interfaces:
-
com.embabel.chat.ConversationFactory
public final class InMemoryConversationFactory implements ConversationFactory
Factory for creating InMemoryConversation instances.
Messages are stored in memory only and not persisted. Suitable for testing and ephemeral sessions.
-
-
Field Summary
Fields Modifier and Type Field Description private final ConversationStoreTypestoreType
-
Constructor Summary
Constructors Constructor Description InMemoryConversationFactory()
-
Method Summary
Modifier and Type Method Description ConversationStoreTypegetStoreType()The storage type this factory provides. Conversationcreate(String id)Create a new conversation with the given ID. -
-
Method Detail
-
getStoreType
ConversationStoreType getStoreType()
The storage type this factory provides.
-
create
Conversation create(String id)
Create a new conversation with the given ID.
- Parameters:
id- unique identifier for the conversation- Returns:
a new Conversation instance
-
-
-
-