Package org.infinispan.cdi.common.util
Class DelegatingContextualLifecycle<T>
java.lang.Object
org.infinispan.cdi.common.util.DelegatingContextualLifecycle<T>
- Type Parameters:
T-
- All Implemented Interfaces:
ContextualLifecycle<T>
An implementation of
ContextualLifecycle that is backed by an
InjectionTarget.- Author:
- Pete Muir, Stuart Douglas
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingContextualLifecycle(InjectionTarget<T> injectionTarget) Instantiate a newContextualLifecyclebacked by anInjectionTarget. -
Method Summary
Modifier and TypeMethodDescriptioncreate(Bean<T> bean, CreationalContext<T> creationalContext) Callback invoked by a created bean whenContextual.create(CreationalContext)is called.voidCallback invoked by a created bean whenContextual.destroy(Object, CreationalContext)is called.
-
Constructor Details
-
DelegatingContextualLifecycle
Instantiate a newContextualLifecyclebacked by anInjectionTarget.- Parameters:
injectionTarget- theInjectionTargetused to create and destroy instances
-
-
Method Details
-
create
Description copied from interface:ContextualLifecycleCallback invoked by a created bean whenContextual.create(CreationalContext)is called.- Specified by:
createin interfaceContextualLifecycle<T>- Parameters:
bean- the bean initiating the callbackcreationalContext- the context in which this instance was created
-
destroy
Description copied from interface:ContextualLifecycleCallback invoked by a created bean whenContextual.destroy(Object, CreationalContext)is called.- Specified by:
destroyin interfaceContextualLifecycle<T>- Parameters:
bean- the bean initiating the callbackinstance- the contextual instance to destroycreationalContext- the context in which this instance was created
-