Interface WeldModule


  • public interface WeldModule
    A Weld module is a unit of code that extends capabilities of Weld. This is done mainly by registering services, beans, contexts and validators. Unlike CDI portable extensions, this SPI is consumed by a limited set of Weld's internal modules that provide integration with Java EE technologies. WeldModules are discovered using ServiceLoader. This API may change and is for internal use only.
    Author:
    Jozef Hartinger
    • Method Detail

      • getName

        String getName()
        The name of the module.
        Returns:
      • postServiceRegistration

        default void postServiceRegistration​(WeldModule.PostServiceRegistrationContext ctx)
        This hook is called once Weld registered Services from the deployment and added its own internal Services. A module may use this hook to discover registered per-deployment services and to register additional services.
        Parameters:
        ctx - context
      • postContextRegistration

        default void postContextRegistration​(WeldModule.PostContextRegistrationContext ctx)
        This hook is called once Weld registered built-in contexts. A module may register additional contexts.
        Parameters:
        ctx - context
      • postBeanArchiveServiceRegistration

        default void postBeanArchiveServiceRegistration​(WeldModule.PostBeanArchiveServiceRegistrationContext ctx)
        This hook is called once Weld registered Services for deployment of a particular bean archive. A module may use this hook to discover services for a particular archive and to register additional services. This method is called for each bean archive that is processed.
        Parameters:
        ctx - context
      • preBeanRegistration

        default void preBeanRegistration​(WeldModule.PreBeanRegistrationContext ctx)
        This hook is called by Weld before it starts deploying beans. A module may register additional built-in beans. This callback is called for each BeanDeployment separately.
        Parameters:
        ctx - context