Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.plugins » [javadoc | source]
org.apache.webbeans.plugins
public interface: OpenWebBeansPlugin [javadoc | source]

All Known Implementing Classes:
    OpenWebBeansEjbPlugin, OpenWebBeansResourcePlugin, EjbPlugin, AbstractOpenWebBeansPlugin, OpenWebBeansJpaPlugin, OpenWebBeansJmsPlugin, OpenWebBeansJsfPlugin, OpenWebBeansJmsPlugin, OpenWebBeansResourcePlugin

Interface which all OpenWebBeans plugins has 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 {@code #startUp()} and {@code #shutDown()}
  2. check functions which will be called when a class is scanned like {@code #isSimpleBeanClass(Class)}
  3. injection preparation functions will be called once when the bean is being scanned like TODO
  4. injection execution will be called every time a been get's injected like {@code #injectResource(Type, Annotation[])}
Method from org.apache.webbeans.plugins.OpenWebBeansPlugin Summary:
checkForValidResources,   injectResource,   isManagedBean,   isResourceAnnotation,   shutDown,   startUp
Method from org.apache.webbeans.plugins.OpenWebBeansPlugin Detail:
 public  void checkForValidResources(Type type,
    Class<?> clazz,
    String name,
    Annotation[] annotations)
    Check conditions for the resources.
 public Object injectResource(Type type,
    Annotation[] annotations)
    Get a resource to inject. A resource is not a usual bean but one predefined one like javax.persistence.PersistenceUnit, javax.persistence.PersistenceContext etc.
 public  void isManagedBean(Class<?> clazz) throws WebBeansConfigurationException
    Make sure that the given class is ok for simple web bean conditions, otherwise throw a {@code WebBeansConfigurationException}
 public boolean isResourceAnnotation(Class<Annotation> annotationClass)
    Check whether the given annotation class represents a resource which can be injected by this plugin.
 public  void shutDown() throws WebBeansConfigurationException
    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.
 public  void startUp() throws WebBeansConfigurationException
    initialise the plugin. This is called once after the very plugin has been loaded.