Class ConversationContainer
java.lang.Object
org.springframework.webflow.conversation.impl.ConversationContainer
- All Implemented Interfaces:
Serializable
Container for conversations that is stored in the session. When the session
expires this container will go with it, implicitly expiring all contained
conversations.
This is an internal helper class of the
SessionBindingConversationManager
.
- Author:
- Erwin Vervaet, Rossen Stoyanchev
- See Also:
-
Constructor Summary
ConstructorDescriptionConversationContainer
(int maxConversations, String sessionKey) Create a new conversation container. -
Method Summary
Modifier and TypeMethodDescriptionprotected ContainedConversation
createConversation
(ConversationParameters parameters, ConversationLock lock) Create a new conversation based on given parameters and add it to the container.Return the identified conversation.protected final List<ContainedConversation>
protected ConversationId
nextId()
void
Remove identified conversation from this container.int
size()
Return the current size of the conversation container: the number of conversations contained within it.
-
Constructor Details
-
ConversationContainer
Create a new conversation container.- Parameters:
maxConversations
- the max number of allowed concurrent conversations, -1 for unlimitedsessionKey
- the key of this conversation container in the session
-
-
Method Details
-
size
public int size()Return the current size of the conversation container: the number of conversations contained within it. -
createConversation
Create a new conversation based on given parameters and add it to the container.- Parameters:
parameters
- descriptive conversation parameterslock
- the conversation lock- Returns:
- the created conversation
-
nextId
-
getConversation
Return the identified conversation.- Parameters:
id
- the id to lookup- Returns:
- the conversation
- Throws:
NoSuchConversationException
- if the conversation cannot be found
-
getConversations
-
removeConversation
Remove identified conversation from this container. -
createContainedConversation
protected ContainedConversation createContainedConversation(ConversationId id, ConversationLock lock)
-