Interface OpenWebBeansPlugin

  • All Known Subinterfaces:
    OpenWebBeansEjbPlugin, OpenWebBeansJavaEEPlugin
    All Known Implementing Classes:
    AbstractOwbPlugin

    public interface OpenWebBeansPlugin

    Interface which all OpenWebBeans plugins have to implement to extend the webbeans-core with additional IOC functionality.

    There are 4 different types of functions for this interface:

    1. plugin lifecycle like #startUp() and #shutDown()
    2. injection execution will be called every time a been gets injected like #injectResource(Type, Annotation[])
    see org.apache.webbeans.plugins.PluginLoader for documentation of the whole mechanism
    • Method Detail

      • startUp

        void startUp()
        initialise the plugin. This is called once after the very plugin has been loaded.
      • shutDown

        void shutDown()
        At shutdown, the plugin must release all locked resources. This is called once before the very plugin gets destroyed. This is usually the case when the WebApplication gets stopped.
      • isManagedBean

        void isManagedBean​(Class<?> clazz)
        Make sure that the given class is ok for simple web bean conditions, otherwise throw a WebBeansConfigurationException
        Parameters:
        clazz - the class to check
      • supportService

        boolean supportService​(Class<?> serviceClass)
        Returns true if plugin provides given service implementation false otherwise.
        Parameters:
        serviceClass - any service class
        Returns:
        true if plugin provides given service implementation
      • supportsJavaEeComponentInjections

        boolean supportsJavaEeComponentInjections​(Class<?> targetClass)
        Returns true if given class supports injections, false otherwise.
        Parameters:
        targetClass - any target class
        Returns:
        true if given class supports injections
      • getSupportedService

        <T> T getSupportedService​(Class<T> serviceClass)
        Gets service instance.
        Type Parameters:
        T - type
        Parameters:
        serviceClass - service class
        Returns:
        service