Interface CDIService.CDIInjectionContext<T>
- Enclosing interface:
CDIService
public static interface CDIService.CDIInjectionContext<T>
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependentContext(CDIService.CDIInjectionContext dependentContext) Add a dependent context to this context so that the dependent context can be cleaned up when this one is.voidcleanup(boolean callPreDestroy) Create the EJB and perform constructor injection, if applicable.jakarta.enterprise.context.spi.CreationalContext<T> jakarta.enterprise.inject.spi.InjectionTarget<T> voidsetCreationalContext(jakarta.enterprise.context.spi.CreationalContext<T> creationalContext) Set the creational context.voidsetInjectionTarget(jakarta.enterprise.inject.spi.InjectionTarget<T> injectionTarget) Set the injection target.voidsetInstance(T instance) Set the instance on this context
-
Method Details
-
getInstance
T getInstance()- Returns:
- The instance associated with this context.
-
setInstance
Set the instance on this context- Parameters:
instance- The instance to set.
-
cleanup
void cleanup(boolean callPreDestroy) -
getInjectionTarget
jakarta.enterprise.inject.spi.InjectionTarget<T> getInjectionTarget()- Returns:
- The injection target.
-
setInjectionTarget
Set the injection target.- Parameters:
injectionTarget- The injection target to set.
-
getCreationalContext
jakarta.enterprise.context.spi.CreationalContext<T> getCreationalContext()- Returns:
- The creational context.
-
setCreationalContext
Set the creational context.- Parameters:
creationalContext- The creational context.
-
addDependentContext
Add a dependent context to this context so that the dependent context can be cleaned up when this one is.- Parameters:
dependentContext- The dependenct context.
-
getDependentContexts
Collection<CDIService.CDIInjectionContext> getDependentContexts()- Returns:
- The dependent contexts.
-
createEjbAfterAroundConstruct
T createEjbAfterAroundConstruct()Create the EJB and perform constructor injection, if applicable. This should only happen when the last interceptor method in the AroundConstruct interceptor chain invokes the InvocationContext.proceed method. If the InvocationContext.proceed method is not invoked by an interceptor method, the target instance will not be created.
-