org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation
Class DefaultConversation

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultConversation
All Implemented Interfaces:
Serializable, Conversation, EditableConversation

@Typed
public class DefaultConversation
extends Object
implements EditableConversation

Author:
Gerhard Petracek
See Also:
Serialized Form

Constructor Summary
DefaultConversation(ConversationKey conversationKey, ConversationExpirationEvaluator expirationEvaluator, ConversationConfig conversationConfig, javax.enterprise.inject.spi.BeanManager beanManager)
           
 
Method Summary
<T> void
addBean(BeanEntry<T> beanEntry)
           
 void close()
           
 void deactivate()
          has to expire a conversation. if the conversation is expired afterwards it has to be inactive
 boolean getActiveState()
           
<T> T
getBean(Class<T> key)
           
 ConversationExpirationEvaluator getExpirationEvaluator()
           
 boolean isActive()
           
 void restart()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultConversation

public DefaultConversation(ConversationKey conversationKey,
                           ConversationExpirationEvaluator expirationEvaluator,
                           ConversationConfig conversationConfig,
                           javax.enterprise.inject.spi.BeanManager beanManager)
Method Detail

isActive

public boolean isActive()
Specified by:
isActive in interface EditableConversation
Returns:
evaluates and returns if the conversation is active

getActiveState

public boolean getActiveState()
Specified by:
getActiveState in interface EditableConversation
Returns:
returns if the conversation is active (without evaluation)

deactivate

public void deactivate()
Description copied from interface: EditableConversation
has to expire a conversation. if the conversation is expired afterwards it has to be inactive

Specified by:
deactivate in interface EditableConversation

close

public void close()
Specified by:
close in interface Conversation

restart

public void restart()
Specified by:
restart in interface Conversation

getBean

public <T> T getBean(Class<T> key)
Specified by:
getBean in interface EditableConversation
Type Parameters:
T - type of the requested bean
Parameters:
key - class of the requested bean
Returns:
an instance of the requested bean if the conversation is active - null otherwise

addBean

public <T> void addBean(BeanEntry<T> beanEntry)
Specified by:
addBean in interface EditableConversation

getExpirationEvaluator

public ConversationExpirationEvaluator getExpirationEvaluator()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.