Package org.apache.webbeans.spi.plugins
Class AbstractOwbPlugin
- java.lang.Object
-
- org.apache.webbeans.spi.plugins.AbstractOwbPlugin
-
- All Implemented Interfaces:
OpenWebBeansPlugin
public abstract class AbstractOwbPlugin extends Object implements OpenWebBeansPlugin
Abstract implementation of theOpenWebBeansPlugin
interface contract.This abstraction provides the empty implementation for the interface. If any subclass of this class wants to define customize method, it has to override related method definition.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractOwbPlugin()
-
Method Summary
All Methods Instance Methods Concrete 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
-
isManagedBean
public void isManagedBean(Class<?> clazz)
Make sure that the given class is ok for simple web bean conditions, otherwise throw aWebBeansConfigurationException
- Specified by:
isManagedBean
in interfaceOpenWebBeansPlugin
- Parameters:
clazz
- the class to check
-
supportsJavaEeComponentInjections
public boolean supportsJavaEeComponentInjections(Class<?> targetClass)
Returns true if given class supports injections, false otherwise.- Specified by:
supportsJavaEeComponentInjections
in interfaceOpenWebBeansPlugin
- Parameters:
targetClass
- any target class- Returns:
- true if given class supports injections
-
shutDown
public 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.- Specified by:
shutDown
in interfaceOpenWebBeansPlugin
-
startUp
public void startUp()
initialise the plugin. This is called once after the very plugin has been loaded.- Specified by:
startUp
in interfaceOpenWebBeansPlugin
-
supportService
public boolean supportService(Class<?> serviceClass)
Returns true if plugin provides given service implementation false otherwise.- Specified by:
supportService
in interfaceOpenWebBeansPlugin
- Parameters:
serviceClass
- any service class- Returns:
- true if plugin provides given service implementation
-
getSupportedService
public <T> T getSupportedService(Class<T> serviceClass)
Gets service instance.- Specified by:
getSupportedService
in interfaceOpenWebBeansPlugin
- Type Parameters:
T
- type- Parameters:
serviceClass
- service class- Returns:
- service
-
-