org.springframework.webflow.conversation.impl
Class SessionBindingConversationManager

java.lang.Object
  extended by org.springframework.webflow.conversation.impl.SessionBindingConversationManager
All Implemented Interfaces:
ConversationManager

public class SessionBindingConversationManager
extends java.lang.Object
implements ConversationManager

Simple implementation of a conversation manager that stores conversations in the session attribute map.

Author:
Erwin Vervaet

Constructor Summary
SessionBindingConversationManager()
           
 
Method Summary
 Conversation beginConversation(ConversationParameters conversationParameters)
          Begin a new conversation.
 Conversation getConversation(ConversationId id)
          Get the conversation with the provided id.
 ConversationId parseConversationId(java.lang.String encodedId)
          Parse the string-encoded conversationId into its object form.
 void setConversationIdGenerator(UidGenerator uidGenerator)
          Sets the configured generator for conversation ids.
 void setMaxConversations(int maxConversations)
          Set the maximum number of allowed concurrent conversations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionBindingConversationManager

public SessionBindingConversationManager()
Method Detail

setConversationIdGenerator

public void setConversationIdGenerator(UidGenerator uidGenerator)
Sets the configured generator for conversation ids.


setMaxConversations

public void setMaxConversations(int maxConversations)
Set the maximum number of allowed concurrent conversations. Set to -1 for no limit.


beginConversation

public Conversation beginConversation(ConversationParameters conversationParameters)
                               throws ConversationException
Description copied from interface: ConversationManager
Begin a new conversation.

Specified by:
beginConversation in interface ConversationManager
Parameters:
conversationParameters - descriptive conversation parameters
Returns:
a service interface allowing access to the conversation context
Throws:
ConversationException - an exception occured

getConversation

public Conversation getConversation(ConversationId id)
                             throws ConversationException
Description copied from interface: ConversationManager
Get the conversation with the provided id.

Specified by:
getConversation in interface ConversationManager
Parameters:
id - the conversation id
Returns:
the conversation
Throws:
NoSuchConversationException - the id provided was invalid
ConversationException

parseConversationId

public ConversationId parseConversationId(java.lang.String encodedId)
                                   throws ConversationException
Description copied from interface: ConversationManager
Parse the string-encoded conversationId into its object form. Essentially, the reverse of ConversationId.toString().

Specified by:
parseConversationId in interface ConversationManager
Parameters:
encodedId - the encoded id
Returns:
the parsed conversation id
Throws:
ConversationException - an exception occured parsing the id


Copyright © 2004-2006. All Rights Reserved.