org.apache.webbeans.spi.plugins
Interface OpenWebBeansPlugin

All Known Subinterfaces:
OpenWebBeansEjbPlugin, OpenWebBeansJavaEEPlugin, OpenWebBeansWebPlugin
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 get's injected like #injectResource(Type, Annotation[])

See Also:
for documentation of the whole mechanism

Method Summary
<T> T
getSupportedService(Class<T> serviceClass)
          Gets service instance.
 void isManagedBean(Class<?> clazz)
          Make sure that the given class is ok for simple web bean conditions, otherwise throw a WebBeansConfigurationException
 void shutDown()
          At shutdown, the plugin must release all locked resources.
 void startUp()
          initialise the plugin.
 boolean supportService(Class<?> serviceClass)
          Returns true if plugin provides given service implementation false otherwise.
 boolean supportsJavaEeComponentInjections(Class<?> targetClass)
          Returns true if given class supports injections, false otherwise.
 

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.

Throws:
WebBeansConfigurationException

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
Throws:
WebBeansConfigurationException - if the given clazz cannot be used as simple web bean.

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


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.