Package org.jboss.weld.contexts
Interface WeldCreationalContext<T>
-
- Type Parameters:
T-
- All Superinterfaces:
CreationalContext<T>,org.jboss.weld.construction.api.WeldCreationalContext<T>
- All Known Implementing Classes:
CreationalContextImpl
public interface WeldCreationalContext<T> extends org.jboss.weld.construction.api.WeldCreationalContext<T>- Author:
- pmuir
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDependentInstance(ContextualInstance<?> contextualInstance)voidaddDependentResourceReference(org.jboss.weld.injection.spi.ResourceReference<?> resourceReference)Register aResourceReferenceas a dependency.booleandestroyDependentInstance(T instance)Destroys dependent instanceContextual<T>getContextual()<S> WeldCreationalContext<S>getCreationalContext(Contextual<S> contextual)List<ContextualInstance<?>>getDependentInstances()Returns an unmodifiable list of dependent instances.<S> SgetIncompleteInstance(Contextual<S> bean)WeldCreationalContext<?>getParentCreationalContext()<S> WeldCreationalContext<S>getProducerReceiverCreationalContext(Contextual<S> contextual)The returnedCreationalContextshares nothing but incomplete instances.voidrelease()Destroys all dependent objects of the instance which is being destroyed, by passing each dependent object toContextual.destroy(Object, CreationalContext).-
Methods inherited from interface javax.enterprise.context.spi.CreationalContext
push
-
-
-
-
Method Detail
-
getCreationalContext
<S> WeldCreationalContext<S> getCreationalContext(Contextual<S> contextual)
-
getProducerReceiverCreationalContext
<S> WeldCreationalContext<S> getProducerReceiverCreationalContext(Contextual<S> contextual)
The returnedCreationalContextshares nothing but incomplete instances.- Parameters:
contextual-- Returns:
- the
CreationalContextfor a producer reciever
-
getIncompleteInstance
<S> S getIncompleteInstance(Contextual<S> bean)
-
addDependentInstance
void addDependentInstance(ContextualInstance<?> contextualInstance)
-
release
void release()
Description copied from interface:CreationalContextDestroys all dependent objects of the instance which is being destroyed, by passing each dependent object toContextual.destroy(Object, CreationalContext).- Specified by:
releasein interfaceCreationalContext<T>
-
getParentCreationalContext
WeldCreationalContext<?> getParentCreationalContext()
- Returns:
- the parent
CreationalContextor null if there isn't any parent.
-
getContextual
Contextual<T> getContextual()
- Returns:
- the
Contextualfor which thisCreationalContextis created.
-
getDependentInstances
List<ContextualInstance<?>> getDependentInstances()
Returns an unmodifiable list of dependent instances.
-
destroyDependentInstance
boolean destroyDependentInstance(T instance)
Destroys dependent instance- Parameters:
instance-- Returns:
- true if the instance was destroyed, false otherwise
-
addDependentResourceReference
void addDependentResourceReference(org.jboss.weld.injection.spi.ResourceReference<?> resourceReference)
Register aResourceReferenceas a dependency.ResourceReference.release()will be called on everyResourceReferenceonce thisCreationalContextinstance is released.
-
-