Package org.apache.webbeans.spi
Interface ScannerService
-
- All Known Subinterfaces:
BdaScannerService
public interface ScannerService
This SPI is for abstracting the class scanning.
In a production environment Many different modules need to perform class scanning (EJB, JSF, JPA, ...). This SPI allows us to only have one central class scanner for the whole application server which only performs the scanning once at startup of each WebApp.
All URL path Strings in this interface contain the the protocol, e.g. 'file:/...' we get directly from
URL.toExternalForm()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description BDABeansXmlScanner
getBDABeansXmlScanner()
Gets BDABeansXMLScanner used to determine the beans.xml modifiers (interceptors, decorators, and, alternatives) that are enabled per BDA.Set<Class<?>>
getBeanClasses()
Gets beans classes that are found in the deployment archives.Set<URL>
getBeanXmls()
Get the URLs of all bean archives in the deployment.void
init(Object object)
Any initialisation action that is required by the implementation.boolean
isBDABeansXmlScanningEnabled()
Deprecated.not supported anymore.void
release()
This method will get called once the information found by the current scan is not needed anymore and the ScannerService might free up resources.void
scan()
Perform the actual class scanning.
-
-
-
Method Detail
-
init
void init(Object object)
Any initialisation action that is required by the implementation.- Parameters:
object
- initialization object
-
scan
void scan()
Perform the actual class scanning.
-
release
void release()
This method will get called once the information found by the current scan is not needed anymore and the ScannerService might free up resources.
-
getBeanXmls
Set<URL> getBeanXmls()
Get the URLs of all bean archives in the deployment. In OWB-1.x this did give the base paths to META-INF/beans.xml files. Now, this will either return the the beans.xml locations or the base URL for the JAR if it is an 'implicit bean archive'.- Returns:
- the URL of the beans.xml files.
-
getBeanClasses
Set<Class<?>> getBeanClasses()
Gets beans classes that are found in the deployment archives. Attention: if the ScannerService is a BdaScannerService then these classes will only get added to the 'default' BDA- Returns:
- bean classes
-
isBDABeansXmlScanningEnabled
@Deprecated boolean isBDABeansXmlScanningEnabled()
Deprecated.not supported anymore. Just here toIndicates if BDABeansXmlScanner is available. This method should only return true if a BDABeansXmlScanner is implemented and the OpenWebBeansConfiguration.USE_BDA_BEANSXML_SCANNER custom property is set to true.- Returns:
- T - BDABeansXmlScanner is available and enabled; F - No BDABeansXmlScanner is available or it is disabled
-
getBDABeansXmlScanner
BDABeansXmlScanner getBDABeansXmlScanner()
Gets BDABeansXMLScanner used to determine the beans.xml modifiers (interceptors, decorators, and, alternatives) that are enabled per BDA. This is different from the default behavior that enables modifiers per application and not just in one BDA contained in an application.- Returns:
- null or reference to BDABeansXMLScanner
-
-