@Typed public class InjectableConversation extends Object implements EditableConversation
Modifier | Constructor and Description |
---|---|
protected |
InjectableConversation(javax.enterprise.inject.spi.Bean<?> bean,
org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.WindowContextManager windowContextManager) |
Modifier and Type | Method and Description |
---|---|
<T> void |
addBean(org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.BeanEntry<T> beanInstance)
Adds a
BeanEntry which represents a scoped bean to the current conversation |
void |
close()
Deactivates the conversation and un-scopes all bean instances immediately.
At the next cleanup the whole conversation will be destroyed. |
void |
deactivate()
has to expire a conversation.
|
protected EditableConversation |
findConversation() |
boolean |
getActiveState() |
<T> T |
getBean(Class<T> key) |
<T> Set<Class<T>> |
getBeanSubGroup(Class<T> key) |
boolean |
isActive() |
<T> org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.BeanEntry<T> |
removeBeanEntry(Class<T> type)
Allows to remove a bean of the given type
|
void |
restart()
Un-scopes all bean instances immediately.
|
protected InjectableConversation(javax.enterprise.inject.spi.Bean<?> bean, org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.WindowContextManager windowContextManager)
public void close()
Conversation
gets resolved before the cleanup, the
WindowContext
has to destroy it.
-> A new conversation will be created immediately.close
in interface Conversation
public void restart()
restart
in interface Conversation
public boolean isActive()
isActive
in interface EditableConversation
public boolean getActiveState()
getActiveState
in interface EditableConversation
public void deactivate()
deactivate
in interface EditableConversation
public <T> void addBean(org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.BeanEntry<T> beanInstance)
BeanEntry
which represents a scoped bean to the current conversationaddBean
in interface EditableConversation
T
- tpye of the beanbeanInstance
- bean instance which should be added to the conversationpublic <T> T getBean(Class<T> key)
getBean
in interface EditableConversation
T
- type of the requested beankey
- class of the requested beanpublic <T> Set<Class<T>> getBeanSubGroup(Class<T> key)
getBeanSubGroup
in interface EditableConversation
T
- type of the requested groupkey
- class of the requested sub-grouppublic <T> org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.BeanEntry<T> removeBeanEntry(Class<T> type)
removeBeanEntry
in interface EditableConversation
T
- target typetype
- type of the beanprotected EditableConversation findConversation()
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.