Package com.embabel.chat
Class MapConversationFactoryProvider
-
- All Implemented Interfaces:
-
com.embabel.chat.ConversationFactoryProvider
public final class MapConversationFactoryProvider implements ConversationFactoryProvider
Simple map-based implementation of ConversationFactoryProvider.
-
-
Constructor Summary
Constructors Constructor Description MapConversationFactoryProvider(ConversationFactory factories)MapConversationFactoryProvider(List<ConversationFactory> factories)MapConversationFactoryProvider(Map<ConversationStoreType, ConversationFactory> factories)
-
Method Summary
Modifier and Type Method Description ConversationFactorygetFactory(ConversationStoreType type)Get a conversation factory for the given store type. ConversationFactorygetFactoryOrNull(ConversationStoreType type)Get a conversation factory for the given store type, or null if not available. Set<ConversationStoreType>availableTypes()Get all registered factory types. -
-
Constructor Detail
-
MapConversationFactoryProvider
MapConversationFactoryProvider(ConversationFactory factories)
-
MapConversationFactoryProvider
MapConversationFactoryProvider(List<ConversationFactory> factories)
-
MapConversationFactoryProvider
MapConversationFactoryProvider(Map<ConversationStoreType, ConversationFactory> factories)
-
-
Method Detail
-
getFactory
ConversationFactory getFactory(ConversationStoreType type)
Get a conversation factory for the given store type.
- Parameters:
type- the conversation store type- Returns:
the factory for that type
-
getFactoryOrNull
ConversationFactory getFactoryOrNull(ConversationStoreType type)
Get a conversation factory for the given store type, or null if not available.
- Parameters:
type- the conversation store type- Returns:
the factory for that type, or null
-
availableTypes
Set<ConversationStoreType> availableTypes()
Get all registered factory types.
-
-
-
-