Spring Web Flow

org.springframework.webflow.conversation.impl
Class ContainedConversation

java.lang.Object
  extended by org.springframework.webflow.conversation.impl.ContainedConversation
All Implemented Interfaces:
java.io.Serializable, Conversation

public class ContainedConversation
extends java.lang.Object
implements Conversation, java.io.Serializable

Internal Conversation implementation used by the conversation container.

This is an internal helper class of the SessionBindingConversationManager.

Author:
Erwin Vervaet
See Also:
Serialized Form

Constructor Summary
ContainedConversation(ConversationContainer container, ConversationId id, ConversationLock lock)
          Create a new contained conversation.
 
Method Summary
 void end()
          Ends this conversation.
 boolean equals(java.lang.Object obj)
           
 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.
 int hashCode()
           
 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.
protected  void setContainer(ConversationContainer container)
           
protected  void setId(ConversationId id)
           
 java.lang.String toString()
           
 void unlock()
          Unlock this conversation, making it available to others for manipulation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainedConversation

public ContainedConversation(ConversationContainer container,
                             ConversationId id,
                             ConversationLock lock)
Create a new contained conversation.

Parameters:
container - the container containing the conversation
id - the unique id assigned to the conversation
lock - the conversation lock
Method Detail

setContainer

protected void setContainer(ConversationContainer container)

getId

public ConversationId getId()
Description copied from interface: Conversation
Returns the unique id assigned to this conversation. This id remains the same throughout the life of the conversation. This method can be safely called without owning the lock of this conversation.

Specified by:
getId in interface Conversation
Returns:
the conversation id

setId

protected void setId(ConversationId id)

lock

public void lock()
Description copied from interface: Conversation
Lock this conversation. May block until the lock is available, if someone else has acquired the lock.

Specified by:
lock in interface Conversation

getAttribute

public java.lang.Object getAttribute(java.lang.Object name)
Description copied from interface: Conversation
Returns the conversation attribute with the specified name. You need to acquire the lock on this conversation before calling this method.

Specified by:
getAttribute in interface Conversation
Parameters:
name - the attribute name
Returns:
the attribute value

putAttribute

public void putAttribute(java.lang.Object name,
                         java.lang.Object value)
Description copied from interface: Conversation
Puts a conversation attribute into this context. You need to acquire the lock on this conversation before calling this method.

Specified by:
putAttribute in interface Conversation
Parameters:
name - the attribute name
value - the attribute value

removeAttribute

public void removeAttribute(java.lang.Object name)
Description copied from interface: Conversation
Removes a conversation attribute. You need to acquire the lock on this conversation before calling this method.

Specified by:
removeAttribute in interface Conversation
Parameters:
name - the attribute name

end

public void end()
Description copied from interface: Conversation
Ends this conversation. This method should only be called once to terminate the conversation and cleanup any allocated resources. You need to aquire the lock on this conversation before calling this method.

Specified by:
end in interface Conversation

unlock

public void unlock()
Description copied from interface: Conversation
Unlock this conversation, making it available to others for manipulation.

Specified by:
unlock in interface Conversation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Spring Web Flow