Package io.micronaut.context.event
Interface BeanPreDestroyEventListener<T>
- Type Parameters:
T
- The event type
- All Superinterfaces:
EventListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@Indexed(BeanPreDestroyEventListener.class)
@FunctionalInterface
public interface BeanPreDestroyEventListener<T>
extends EventListener
An event listener that is triggered before a bean is destroyed.
Allows customization of the bean destruction.
- Since:
- 3.0.0
- Author:
- Graeme Rocher
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiononPreDestroy
(@NonNull BeanPreDestroyEvent<T> event) Fired when a bean is about to be destroyed but before anyPreDestroy
methods have been invoked.
-
Method Details
-
onPreDestroy
Fired when a bean is about to be destroyed but before anyPreDestroy
methods have been invoked.- Parameters:
event
- The bean created event- Returns:
- The bean or a replacement bean of the same type
-