Package org.infinispan.cdi.common.util
Interface ContextualLifecycle<T>
- Type Parameters:
T- the class of the bean instance
- All Known Implementing Classes:
DelegatingContextualLifecycle
public interface ContextualLifecycle<T>
Callbacks used by
BeanBuilder and ImmutableBean to allow control
of the creation and destruction of a custom bean.- Author:
- Stuart Douglas
-
Method Summary
Modifier and TypeMethodDescriptioncreate(Bean<T> bean, CreationalContext<T> creationalContext) Callback invoked by a created bean whenContextual.create(CreationalContext)is called.default voidCallback invoked by a created bean whenContextual.destroy(Object, CreationalContext)is called.
-
Method Details
-
create
Callback invoked by a created bean whenContextual.create(CreationalContext)is called.- Parameters:
bean- the bean initiating the callbackcreationalContext- the context in which this instance was created
-
destroy
Callback invoked by a created bean whenContextual.destroy(Object, CreationalContext)is called.- Parameters:
bean- the bean initiating the callbackinstance- the contextual instance to destroycreationalContext- the context in which this instance was created
-