Interface SyntheticBeanDisposer<T>
-
- Type Parameters:
T- the bean class of the synthetic bean
public interface SyntheticBeanDisposer<T>Destruction function for a synthetic bean defined bySyntheticBeanBuilder. CDI container will create an instance of the destruction function every time when it needs to destroy an instance of the synthetic bean. Implementations must bepublicclasses with apubliczero-parameter constructor; they must not be beans.- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose(T instance, Instance<Object> lookup, Parameters params)Destroys an instance of the synthetic bean.
-
-
-
Method Detail
-
dispose
void dispose(T instance, Instance<Object> lookup, Parameters params)
Destroys an instance of the synthetic bean.The
Instanceparameter may be used to simulate disposer method parameter injection. All@Dependentbean instances obtained from theInstanceduring execution are destroyed when execution completes.Trying to look up
InjectionPointfrom theInstanceparameter is invalid.The parameter map contains the same values that were passed to the
SyntheticBeanBuilderthat defined the synthetic bean.- Parameters:
instance- the synthetic bean instance, nevernulllookup- anInstancethat can be used to lookup other beans, nevernullparams- the parameter map, nevernull
-
-