public interface WeldAlterableContext
extends javax.enterprise.context.spi.AlterableContext
AlterableContext which allows to capture all instances from given context or to set them to
previously obtained values.
Most built-in contexts implement this in order to support context propagation. Exception are ApplicationContext which
works out of the box and then SingletonContext and DependentContext which are not to be propagated.| Modifier and Type | Method and Description |
|---|---|
default void |
clearAndSet(Collection<ContextualInstance<?>> setOfInstances)
Clears the backing bean store and feeds it with the set of
ContextualInstance provided as parameter. |
default Collection<ContextualInstance<?>> |
getAllContextualInstances()
Retrieves set of
ContextualInstance within the context. |
default Collection<ContextualInstance<?>> getAllContextualInstances()
ContextualInstance within the context. This entails all instances that were created up to this point - Weld creates
them lazily so unless some beans were already used, they have not been stored.ContextualInstance existing in this contextdefault void clearAndSet(Collection<ContextualInstance<?>> setOfInstances)
ContextualInstance provided as parameter.
All ContextualInstance have to belong to the same scope as does this WeldAlterableContext otherwise
IllegalArgumentException is thrown.setOfInstances - set of ContextualInstance which are to become the new bean store for this contextIllegalArgumentException - if ContextualInstances belong to different scope than this contextCopyright © 2008–2019. All rights reserved.