org.apache.webbeans.conversation
Class ConversationManager

java.lang.Object
  extended by org.apache.webbeans.conversation.ConversationManager

public class ConversationManager
extends Object

Manager for the conversations. Each conversation is related with conversation id and session id.

Version:
$Rev: 1182780 $ $Date: 2011-10-13 13:11:03 +0200 (Do, 13 Okt 2011) $

Constructor Summary
ConversationManager(WebBeansContext webBeansContext)
          Creates new conversation manager
 
Method Summary
 void addConversationContext(javax.enterprise.context.Conversation conversation, ConversationContext context)
          Adds new conversation context.
 void destroyAllConversations()
          Destroys all conversations
 void destroyConversationContextWithSessionId(String sessionId)
          Destroy conversations with given session id.
 void destroyWithRespectToTimout()
          Destroy unactive conversations.
 javax.enterprise.context.Conversation getConversationBeanReference()
          Gets conversation instance from conversation bean.
 ConversationContext getConversationContext(javax.enterprise.context.Conversation conversation)
          Gets conversation's context instance.
 Map<javax.enterprise.context.Conversation,ConversationContext> getConversationMapWithSessionId(String sessionId)
          Return all conversation/context associated with sessionid.
 javax.enterprise.context.Conversation getPropogatedConversation(String conversationId, String sessionId)
          Gets conversation with id and session id.
 boolean isConversationExistWithGivenId(String conversationId)
          Check conversation id exists.
 ConversationContext removeConversation(javax.enterprise.context.Conversation conversation)
          Remove given conversation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversationManager

public ConversationManager(WebBeansContext webBeansContext)
Creates new conversation manager

Method Detail

addConversationContext

public void addConversationContext(javax.enterprise.context.Conversation conversation,
                                   ConversationContext context)
Adds new conversation context.

Parameters:
conversation - new conversation
context - new context

isConversationExistWithGivenId

public boolean isConversationExistWithGivenId(String conversationId)
Check conversation id exists.

Parameters:
conversationId - conversation id
Returns:
true if this conversation exist

getConversationMapWithSessionId

public Map<javax.enterprise.context.Conversation,ConversationContext> getConversationMapWithSessionId(String sessionId)
Return all conversation/context associated with sessionid.

Parameters:
sessionId -
Returns:

removeConversation

public ConversationContext removeConversation(javax.enterprise.context.Conversation conversation)
Remove given conversation.

Parameters:
conversation - conversation instance
Returns:
context

getConversationContext

public ConversationContext getConversationContext(javax.enterprise.context.Conversation conversation)
Gets conversation's context instance.

Parameters:
conversation - conversation instance
Returns:
conversation related context

getPropogatedConversation

public javax.enterprise.context.Conversation getPropogatedConversation(String conversationId,
                                                                       String sessionId)
Gets conversation with id and session id.

Parameters:
conversationId - conversation id
sessionId - session id
Returns:
conversation

destroyConversationContextWithSessionId

public void destroyConversationContextWithSessionId(String sessionId)
Destroy conversations with given session id.

Parameters:
sessionId - session id

getConversationBeanReference

public javax.enterprise.context.Conversation getConversationBeanReference()
Gets conversation instance from conversation bean.

Returns:
conversation instance

destroyWithRespectToTimout

public void destroyWithRespectToTimout()
Destroy unactive conversations.


destroyAllConversations

public void destroyAllConversations()
Destroys all conversations



Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.