Class ContainedConversation
java.lang.Object
org.springframework.webflow.conversation.impl.ContainedConversation
- All Implemented Interfaces:
Serializable
,Conversation
Internal
Conversation
implementation used by the conversation container.
This is an internal helper class of the SessionBindingConversationManager
.
- Author:
- Erwin Vervaet
- See Also:
-
Constructor Summary
ConstructorDescriptionContainedConversation
(ConversationContainer container, ConversationId id, ConversationLock lock) Create a new contained conversation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
end()
Ends this conversation.boolean
getAttribute
(Object name) Returns the conversation attribute with the specified name.getId()
Returns the unique id assigned to this conversation.int
hashCode()
void
lock()
Lock this conversation.void
putAttribute
(Object name, Object value) Puts a conversation attribute into this context.void
removeAttribute
(Object name) Removes a conversation attribute.protected void
setContainer
(ConversationContainer container) protected void
setId
(ConversationId id) toString()
void
unlock()
Unlock this conversation, making it available to others for manipulation.
-
Constructor Details
-
ContainedConversation
public ContainedConversation(ConversationContainer container, ConversationId id, ConversationLock lock) Create a new contained conversation.- Parameters:
container
- the container containing the conversationid
- the unique id assigned to the conversationlock
- the conversation lock
-
-
Method Details
-
setContainer
-
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 interfaceConversation
- Returns:
- the conversation id
-
setId
-
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 interfaceConversation
-
getAttribute
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 interfaceConversation
- Parameters:
name
- the attribute name- Returns:
- the attribute value
-
putAttribute
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 interfaceConversation
- Parameters:
name
- the attribute namevalue
- the attribute value
-
removeAttribute
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 interfaceConversation
- 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 interfaceConversation
-
unlock
public void unlock()Description copied from interface:Conversation
Unlock this conversation, making it available to others for manipulation.- Specified by:
unlock
in interfaceConversation
-
toString
-
equals
-
hashCode
public int hashCode()
-