@Typed public class DefaultConversation extends Object implements EditableConversation
| Constructor and Description |
|---|
DefaultConversation(ConversationKey conversationKey,
ConversationExpirationEvaluator expirationEvaluator,
ConversationConfig conversationConfig,
javax.enterprise.inject.spi.BeanManager beanManager)
Constructor which creates a conversation for the given
ConversationKey, ConversationExpirationEvaluator, ConversationConfig
and BeanManager |
| Modifier and Type | Method and Description |
|---|---|
<T> void |
addBean(BeanEntry<T> beanEntry)
Adds a
BeanEntry which represents a scoped bean to the current conversation |
void |
close() |
void |
deactivate()
has to expire a conversation.
|
boolean |
getActiveState() |
<T> T |
getBean(Class<T> key) |
<T> Set<Class<T>> |
getBeanSubGroup(Class<T> key) |
ConversationExpirationEvaluator |
getExpirationEvaluator()
just for test-cases (to expire a conversation manually)
|
boolean |
isActive() |
<T> BeanEntry<T> |
removeBeanEntry(Class<T> type)
Allows to remove a bean of the given type
|
void |
restart() |
String |
toString() |
public DefaultConversation(ConversationKey conversationKey, ConversationExpirationEvaluator expirationEvaluator, ConversationConfig conversationConfig, javax.enterprise.inject.spi.BeanManager beanManager)
ConversationKey, ConversationExpirationEvaluator, ConversationConfig
and BeanManagerconversationKey - key of the current conversationexpirationEvaluator - expiration strategy which decides if the current conversation is expiredconversationConfig - current conversation-configbeanManager - current bean-managerpublic boolean isActive()
isActive in interface EditableConversationpublic boolean getActiveState()
getActiveState in interface EditableConversationpublic void deactivate()
deactivate in interface EditableConversationpublic void close()
close in interface Conversationpublic void restart()
restart in interface Conversationpublic <T> T getBean(Class<T> key)
getBean in interface EditableConversationT - type of the requested beankey - class of the requested beanpublic <T> Set<Class<T>> getBeanSubGroup(Class<T> key)
getBeanSubGroup in interface EditableConversationT - type of the requested groupkey - class of the requested sub-grouppublic <T> void addBean(BeanEntry<T> beanEntry)
BeanEntry which represents a scoped bean to the current conversationaddBean in interface EditableConversationT - tpye of the beanbeanEntry - bean instance which should be added to the conversationpublic <T> BeanEntry<T> removeBeanEntry(Class<T> type)
removeBeanEntry in interface EditableConversationT - target typetype - type of the beanpublic ConversationExpirationEvaluator getExpirationEvaluator()
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.