Interface BeanCreationListener

  • All Superinterfaces:
    EventListener

    public interface BeanCreationListener
    extends EventListener

    Definition of an interface for objects that are interested in the creation of beans by a BeanContext.

    Objects implementing this interface can be registered at a BeanContext as bean creation listeners. They will then be notified whenever a new bean is created by the context. This is a very powerful means of intercepting the bean creation process. For instance, a listener can perform enhanced initialization on certain types of beans and inject property values that are known at runtime only.

    Version:
    $Id: BeanCreationListener.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Method Detail

      • beanCreated

        void beanCreated​(BeanCreationEvent event)
        Notifies this listener about the creation of a new bean. The passed in event object contains all information available about the new bean.
        Parameters:
        event - the event with information about the bean creation