BeanPostProcessor that adds a before-destruction callback.
The typical usage will be to invoke custom destruction callbacks on specific bean types, matching corresponding initialization callbacks.
| Modifier and Type | Method and Description |
|---|---|
| public void | postProcessBeforeDestruction(Object
the bean instance to be destroyed bean, String the name of the bean beanName)Apply this BeanPostProcessor to the given bean instance before its destruction, e.g. invoking custom destruction callbacks. |
| public default boolean | Returns: true if postProcessBeforeDestruction is supposed to
be called for this bean instance eventually, or false if not neededthe bean instance to check bean)Determine whether the given bean instance requires destruction by this post-processor. |
| postProcessBeforeDestruction | back to summary |
|---|---|
| public void postProcessBeforeDestruction(Object bean, String beanName) throws BeansException Apply this BeanPostProcessor to the given bean instance before its destruction, e.g. invoking custom destruction callbacks. Like DisposableBean's
| |
| requiresDestruction | back to summary |
|---|---|
| public default boolean requiresDestruction(Object bean) Determine whether the given bean instance requires destruction by this post-processor. The default implementation returns
| |