org.springframework.webflow.conversation
Interface Conversation


public interface Conversation

A service interface for working with state associated with a single logical user interaction called a "conversation".

A conversation provides a "task" context that is begun and eventually ends. Between the beginning and the end attributes can be placed in and read from a conversation's context.

Once begun, the conversation can be locked to obtain exclusive access to manipulating it. Once the conversation is "done", it can be ended.

Note that the attributes associated with a conversation are not "conversation scope" as defined for a flow execution. They can be any attributes, possibly technical in nature, associated with the conversation.

Author:
Keith Donald

Method Summary
 void end()
          Ends this conversation.
 java.lang.Object getAttribute(java.lang.Object name)
          Returns the conversation attribute with the specified name.
 ConversationId getId()
          Returns the unique id assigned to this conversation.
 void lock()
          Lock this conversation.
 void putAttribute(java.lang.Object name, java.lang.Object value)
          Puts a conversation attribute into this context.
 void removeAttribute(java.lang.Object name)
          Removes a conversation attribute.
 void unlock()
          Unlock this conversation, making it available for others for manipulation.
 

Method Detail

getId

ConversationId getId()
Returns the unique id assigned to this conversation. This id remains the same throughout the life of the conversation.

Returns:
the conversation id

lock

void lock()
Lock this conversation. May block until the lock is available, if someone else has acquired the lock.


getAttribute

java.lang.Object getAttribute(java.lang.Object name)
Returns the conversation attribute with the specified name.

Parameters:
name - the attribute name
Returns:
the attribute value

putAttribute

void putAttribute(java.lang.Object name,
                  java.lang.Object value)
Puts a conversation attribute into this context.

Parameters:
name - the attribute name
value - the attribute value

removeAttribute

void removeAttribute(java.lang.Object name)
Removes a conversation attribute.

Parameters:
name - the attribute name

end

void end()
Ends this conversation. This method should only be called once to terminate the conversation and cleanup any allocated resources.


unlock

void unlock()
Unlock this conversation, making it available for others for manipulation.



Copyright © 2004-2006. All Rights Reserved.