Package io.micronaut.context.event
Interface BeanInitializedEventListener<T>
-
- Type Parameters:
T
- The event type
- All Superinterfaces:
java.util.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(BeanInitializedEventListener.class) @FunctionalInterface public interface BeanInitializedEventListener<T> extends java.util.EventListener
Allows hooking into bean instantiation at the point prior to when
PostConstruct
initialization hooks have been called and in the case of beanBeanProvider
instances theBeanProvider.get()
method has not yet been invoked.This allows (for example) customization of bean properties prior to any initialization logic or factory logic.
- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
onInitialized(BeanInitializingEvent<T> event)
Fired when a bean is instantiated but thePostConstruct
initialization hooks have not yet been called and in this case of beanProvider
instances theProvider.get()
method has not yet been invoked.
-
-
-
Method Detail
-
onInitialized
T onInitialized(BeanInitializingEvent<T> event)
Fired when a bean is instantiated but the
PostConstruct
initialization hooks have not yet been called and in this case of beanProvider
instances theProvider.get()
method has not yet been invoked.- Parameters:
event
- The bean initializing event- Returns:
- The bean or a replacement bean of the same type
-
-