public class ConversationContainer
extends java.lang.Object
implements java.io.Serializable
This is an internal helper class of the
SessionBindingConversationManager
.
Constructor and Description |
---|
ConversationContainer(int maxConversations,
java.lang.String sessionKey)
Create a new conversation container.
|
Modifier and Type | Method and Description |
---|---|
protected ContainedConversation |
createContainedConversation(ConversationId id,
ConversationLock lock) |
Conversation |
createConversation(ConversationParameters parameters,
ConversationLock lock)
Create a new conversation based on given parameters and add it to the container.
|
Conversation |
getConversation(ConversationId id)
Return the identified conversation.
|
protected java.util.List<ContainedConversation> |
getConversations() |
protected ConversationId |
nextId() |
void |
removeConversation(ConversationId id)
Remove identified conversation from this container.
|
int |
size()
Return the current size of the conversation container:
the number of conversations contained within it.
|
public ConversationContainer(int maxConversations, java.lang.String sessionKey)
maxConversations
- the max number of allowed concurrent conversations, -1 for unlimitedsessionKey
- the key of this conversation container in the sessionpublic int size()
public Conversation createConversation(ConversationParameters parameters, ConversationLock lock)
parameters
- descriptive conversation parameterslock
- the conversation lockprotected ConversationId nextId()
public Conversation getConversation(ConversationId id) throws NoSuchConversationException
id
- the id to lookupNoSuchConversationException
- if the conversation cannot be foundprotected final java.util.List<ContainedConversation> getConversations()
public void removeConversation(ConversationId id)
protected ContainedConversation createContainedConversation(ConversationId id, ConversationLock lock)