Package org.apache.webbeans.spi.plugins
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:
-
plugin lifecycle like
#startUp()
and#shutDown()
-
injection execution will be called every time a been gets
injected like
#injectResource(Type, Annotation[])
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <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 aWebBeansConfigurationException
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.
-
isManagedBean
void isManagedBean(Class<?> clazz)
Make sure that the given class is ok for simple web bean conditions, otherwise throw aWebBeansConfigurationException
- 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
-
-